From 281e325bea944f93b7583e7e62dd00782bff2f78 Mon Sep 17 00:00:00 2001 From: yangrz Date: Tue, 23 Jan 2024 20:50:34 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=8A=E6=8B=89=E5=8A=A0=E8=BD=BD=E6=9B=B4?= =?UTF-8?q?=E5=A4=9A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- agentApp/pages/history/history.vue | 89 +++++++++++-------- agentApp/pages/merchant-index/index.vue | 30 +++++-- agentApp/pages/user-orders/user-orders.vue | 27 +++++- .../withdrawal-history/withdrawal-history.vue | 30 +++++-- 4 files changed, 123 insertions(+), 53 deletions(-) diff --git a/agentApp/pages/history/history.vue b/agentApp/pages/history/history.vue index 9ccd7b0..fcdb248 100644 --- a/agentApp/pages/history/history.vue +++ b/agentApp/pages/history/history.vue @@ -36,13 +36,14 @@ 审核时间:{{item.reviewed_at}} - + {{ hasMore ? '加载更多数据...' : '已加载完毕' }} @@ -55,65 +56,83 @@ data() { return { withdrawList: [], + hasMore: true, + page: 0, }; }, onLoad() { this.getWithdrawList() }, + onReachBottom() { + this.getWithdrawList() + }, methods: { getWithdrawList() { + if (!this.hasMore) { + return + } + this.page++ agentWithdrawList({ - page: 1, + page: this.page, page_size: 15, - }).then(data => this.withdrawList = data.list) + }).then(data => { + this.withdrawList = [...this.withdrawList, ...data.list] + this.hasMore = data.has_more + }) } } } + \ No newline at end of file diff --git a/agentApp/pages/merchant-index/index.vue b/agentApp/pages/merchant-index/index.vue index 9780c3a..e13cac2 100644 --- a/agentApp/pages/merchant-index/index.vue +++ b/agentApp/pages/merchant-index/index.vue @@ -73,12 +73,9 @@ - - - - - + {{ hasMore ? '加载更多数据...' : '已加载完毕' }} +