From 13d232319035c35a3989cd5d563f07ab039cee4b Mon Sep 17 00:00:00 2001 From: WindowBird <13870814+windows-bird@user.noreply.gitee.com> Date: Fri, 29 Aug 2025 16:29:27 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=86=E9=A1=B5=E7=BB=84=E4=BB=B6=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0=E5=8A=9F=E8=83=BD=E8=AE=A1=E7=AE=97=E6=9C=AA=E5=8A=A0?= =?UTF-8?q?=E8=BD=BD=E7=9A=84=E9=A1=B9=E7=9A=84=E6=95=B0=E7=9B=AE=EF=BC=8C?= =?UTF-8?q?click=E6=9F=A5=E7=9C=8B=E6=8D=90=E6=AC=BE=E8=AE=B0=E5=BD=95?= =?UTF-8?q?=E8=B7=B3=E8=BD=AC=E5=88=B0=E6=8D=90=E6=AC=BE=E5=88=97=E8=A1=A8?= =?UTF-8?q?=E9=A1=B5=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- composables/winB_Pagination.js | 5 +++++ pages/future/future.vue | 23 ++++++++++++++--------- 2 files changed, 19 insertions(+), 9 deletions(-) diff --git a/composables/winB_Pagination.js b/composables/winB_Pagination.js index b9760ae..94985c7 100644 --- a/composables/winB_Pagination.js +++ b/composables/winB_Pagination.js @@ -36,6 +36,7 @@ export function createPagination(options = {}) { currentPage: 1, pageSize, totalPages: 0, + remainingItems: 0, }, // 上拉加载相关 @@ -94,6 +95,10 @@ export function createPagination(options = {}) { currentPage: this.winB_QueryParams.pageNum, pageSize, totalPages: Math.ceil(total / pageSize), + remainingItems: Math.max( + 0, + total - this.winB_QueryParams.pageNum * pageSize, + ), }; // 检查是否还有更多数据 diff --git a/pages/future/future.vue b/pages/future/future.vue index 21616a5..514d069 100644 --- a/pages/future/future.vue +++ b/pages/future/future.vue @@ -38,7 +38,7 @@ - 查看捐款记录 @@ -71,7 +71,7 @@ 查看更多{{ remainingItems }}条进展 + >查看更多{{ winB_Pagination.remainingItems }}条进展 到底了 @@ -243,13 +243,18 @@ export default { loadMore() { this.winB_LoadMore(); }, - }, - computed: { - remainingItems() { - return ( - this.winB_Pagination.total - - this.winB_Pagination.currentPage * this.winB_Pagination.pageSize - ); + goDonationRecord() { + // 跳转到捐款记录页面,传递建制ID + uni.navigateTo({ + url: `/pages/institutionalStructure/donationRecord?formedId=${this.formedId}`, + fail: (err) => { + console.error("跳转失败:", err); + uni.showToast({ + title: "页面跳转失败", + icon: "none", + }); + }, + }); }, }, };