diff --git a/backend/__debug_bin3572908368 b/backend/__debug_bin3572908368 old mode 100644 new mode 100755 index e69de29..f194b0a Binary files a/backend/__debug_bin3572908368 and b/backend/__debug_bin3572908368 differ diff --git a/frontend/src/views/tabs/BoughtView.vue b/frontend/src/views/tabs/BoughtView.vue index 8367bfa..b239044 100644 --- a/frontend/src/views/tabs/BoughtView.vue +++ b/frontend/src/views/tabs/BoughtView.vue @@ -1,95 +1,3 @@ - - +

Bought

+ \ No newline at end of file diff --git a/frontend/src/views/tabs/HomeView.vue b/frontend/src/views/tabs/HomeView.vue index 11edfcd..4a61838 100644 --- a/frontend/src/views/tabs/HomeView.vue +++ b/frontend/src/views/tabs/HomeView.vue @@ -48,14 +48,16 @@ const pageLimit = ref(10); const offset = ref(""); -const onLoad = () => { }; - const play = (item) => { // vue router goto play view console.log("play -", item); router.push({ name: "play", params: { id: item } }); }; +setInterval(() => { + console.log("loading finished: ", loading.value, finished.value); +}, 1000); + const loadData = () => { // request /v1/medias const data = { @@ -65,37 +67,38 @@ const loadData = () => { }; console.log("loadData, data: ", data); - loading.value = false; request .post("/medias", data) .then((res) => { - loading.value = false; - console.log("response: ", res); + if (res === undefined) { + console.error("response error with undefined"); + return; + } + if (offset.value == "") { items.value = res.data; } else { items.value = items.value.concat(res.data); } offset.value = res.data[res.data.length - 1].hash; + console.log("offset: ", offset.value); if (res.data.length < pageLimit.value) { console.log("finished"); finished.value = true; - loading.value = false; } - }) .catch((err) => { - console.error(err); + console.error("ERROR", err); }) .finally(() => { - // loading.value = true; - // finished.value = true; + loading.value = false; + console.log("finally: ", loading.value, finished.value); }); }; onMounted(() => { - // loadData(); + loadData(); });