feat: update list view
This commit is contained in:
1
backend/.gitignore
vendored
1
backend/.gitignore
vendored
@@ -1,3 +1,4 @@
|
||||
bin/*
|
||||
vendor/
|
||||
__debug_bin*
|
||||
backend
|
||||
|
||||
@@ -17,7 +17,7 @@ dist:
|
||||
|
||||
.PHONY: release
|
||||
release:
|
||||
@go build -ldflags=${flags} -o bin/release/atom
|
||||
@CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o bin/release/app .
|
||||
@cp config.toml bin/release/
|
||||
|
||||
.PHONY: test
|
||||
@@ -47,4 +47,4 @@ mdown:
|
||||
|
||||
.PHONY: model
|
||||
model:
|
||||
go test -run ^Test_GenModel
|
||||
go test -run ^Test_GenModel
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<van-back-top bottom="80" />
|
||||
|
||||
<van-list style="padding-bottom: 3em" v-model:loading="loading" error-text="请求失败,点击重新加载" :finished="finished"
|
||||
v-model:error="error" :finished-text="bought ? '您还没有购买' : '没有更多了'" offset="100" @load="loadData">
|
||||
v-model:error="error" :finished-text="finishText" offset="100" @load="loadData">
|
||||
<list-item-card v-for="item in items" :key="item" :item="item" :bought="bought" />
|
||||
</van-list>
|
||||
</template>
|
||||
@@ -26,6 +26,8 @@ export default defineComponent({
|
||||
const pageLimit = ref(10);
|
||||
const offset = ref("");
|
||||
|
||||
const finishText = ref("没有更多了");
|
||||
|
||||
const onSearch = () => {
|
||||
items.value = [];
|
||||
offset.value = "";
|
||||
@@ -60,6 +62,10 @@ export default defineComponent({
|
||||
finished.value = true;
|
||||
}
|
||||
|
||||
if (offset == "" && res.data.length === 0 && props.bought) {
|
||||
finishText.value = "您还没有购买任何视频";
|
||||
}
|
||||
|
||||
if (offset.value == "") {
|
||||
items.value = res.data;
|
||||
} else {
|
||||
@@ -69,8 +75,9 @@ export default defineComponent({
|
||||
|
||||
})
|
||||
.catch((err) => {
|
||||
console.error("ERROR", err);
|
||||
console.log("ERR", err)
|
||||
error.value = true
|
||||
// finished.value = true
|
||||
})
|
||||
.finally(() => {
|
||||
loading.value = false;
|
||||
@@ -78,6 +85,7 @@ export default defineComponent({
|
||||
};
|
||||
|
||||
return {
|
||||
error,
|
||||
search,
|
||||
items,
|
||||
loading,
|
||||
|
||||
20
readme.md
20
readme.md
@@ -1,16 +1,26 @@
|
||||
discover
|
||||
### commands
|
||||
|
||||
#### discover
|
||||
```
|
||||
./backend tasks discover --from /mnt/yangpingliang/publish/ --to /mnt/yangpingliang/publish/processed/1
|
||||
```
|
||||
|
||||
sync
|
||||
|
||||
#### sync
|
||||
```
|
||||
rsync -avh --progress /mnt/ypl/publish/processed/ server.ali.bj.01:/data
|
||||
```
|
||||
|
||||
store
|
||||
#### store
|
||||
```
|
||||
tasks store --from /app/processed
|
||||
```
|
||||
```
|
||||
|
||||
### crontab example for rockey8
|
||||
|
||||
Add the following lines to your crontab file to run the discover command every hour and run the sync command only if discover is successful:
|
||||
```
|
||||
0 * * * * /bin/bash -c 'qvyun tasks discover --from /mnt/yangpingliang/publish/ --to /mnt/yangpingliang/publish/processed/1 && rsync -avh --progress /mnt/ypl/publish/processed/ server.ali.bj.01:/data'
|
||||
```
|
||||
|
||||
|
||||
### docker images
|
||||
|
||||
Reference in New Issue
Block a user