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", + }); + }, + }); }, }, };