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 ? '加载更多数据...' : '已加载完毕' }}
+