From 816d84a76c1a2f16f88dba70664397961f55caa1 Mon Sep 17 00:00:00 2001
From: jiangping <jp@doumee.com>
Date: 星期五, 26 七月 2024 10:07:56 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'
---
wechat_jiaxuan/pages/userinfo/collect.js | 16 +++++++++++-----
1 files changed, 11 insertions(+), 5 deletions(-)
diff --git a/wechat_jiaxuan/pages/userinfo/collect.js b/wechat_jiaxuan/pages/userinfo/collect.js
index 48a16c4..da9ee29 100644
--- a/wechat_jiaxuan/pages/userinfo/collect.js
+++ b/wechat_jiaxuan/pages/userinfo/collect.js
@@ -11,18 +11,24 @@
dataList: [],
total: 0,
- pageNum: 1,
+ pageNum: 1,
pageSize: 10,
},
onLoad(options) {
this.getList()
},
onReachBottom() {
- if(this.data.total > this.data.dataset.length){
- this.setData({ pageNum: this.data.pageNum + 1 })
+ console.log('瑙﹀簳浜嬩欢');
+ const { total, dataList, pageNum } = this.data
+ if(total > dataList.length){
+ this.setData({ pageNum: pageNum + 1 })
this.getList()
+ }else{
+ wx.showToast({
+ title: '鏆傛棤鏇村鏁版嵁',
+ icon: 'none'
+ })
}
- // this.pageN
},
tabsChange(e) {
const activeTabs = e.currentTarget.dataset.val
@@ -61,7 +67,7 @@
}).then(res => {
if (res.data) {
this.setData({
- dataList: [...this.data.dataset, ...res.data.records || []],
+ dataList: [...this.data.dataList, ...res.data.records || []],
total: res.data.total
})
}
--
Gitblit v1.9.3