diff --git a/frontend/src/stores/resource.ts b/frontend/src/stores/resource.ts index 7888933..4c5df53 100644 --- a/frontend/src/stores/resource.ts +++ b/frontend/src/stores/resource.ts @@ -144,8 +144,8 @@ export const useResourceStore = defineStore("resource", { if (data.length === 0) { const list = this.resources.find((item) => item.id === channelId)?.list; list && list[list.length - 1] && (list[list.length - 1]!.isLastMessage = true); + ElMessage.warning("没有更多了~"); } - ElMessage.warning("没有更多了~"); } else { this.resources = data.map((item, index) => ({ ...item, displayList: index === 0 })); if (!keyword) { @@ -161,6 +161,7 @@ export const useResourceStore = defineStore("resource", { } } } catch (error) { + console.log(error); this.handleError("搜索失败,请重试", null); } finally { this.loading = false; diff --git a/frontend/src/views/mobile/ResourceList.vue b/frontend/src/views/mobile/ResourceList.vue index 802dcf0..677e167 100644 --- a/frontend/src/views/mobile/ResourceList.vue +++ b/frontend/src/views/mobile/ResourceList.vue @@ -230,7 +230,7 @@ const doScroll = () => { const appElement = document.querySelector("#app") as HTMLElement; if (appElement) { const { scrollHeight, scrollTop, clientHeight } = appElement; - if (scrollHeight - (clientHeight + scrollTop) <= 0) { + if (scrollHeight - (clientHeight + scrollTop) <= 1) { throttledLoadMore(currentTab.value); } }