From 716ab46fb071ed48bc75d10fabed66bd8fcae6f1 Mon Sep 17 00:00:00 2001
From: k94314517 <8417338+k94314517@user.noreply.gitee.com>
Date: 星期一, 22 七月 2024 15:45:11 +0800
Subject: [PATCH] 代码提交
---
wechat_jiaxuan/pages/userinfo/collect.js | 14 ++++++++++----
1 files changed, 10 insertions(+), 4 deletions(-)
diff --git a/wechat_jiaxuan/pages/userinfo/collect.js b/wechat_jiaxuan/pages/userinfo/collect.js
index 48a16c4..2ff7453 100644
--- a/wechat_jiaxuan/pages/userinfo/collect.js
+++ b/wechat_jiaxuan/pages/userinfo/collect.js
@@ -18,11 +18,17 @@
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