From 4eaf6d8835d4e9b204f13d012f13bbd8a94a21cc Mon Sep 17 00:00:00 2001
From: liukangdong <898885815@qq.com>
Date: 星期日, 21 七月 2024 22:52:37 +0800
Subject: [PATCH] lll
---
wechat_jiaxuan/components/disCase/index.js | 23 +++++++++++++++++++++--
1 files changed, 21 insertions(+), 2 deletions(-)
diff --git a/wechat_jiaxuan/components/disCase/index.js b/wechat_jiaxuan/components/disCase/index.js
index f10577b..835f66a 100644
--- a/wechat_jiaxuan/components/disCase/index.js
+++ b/wechat_jiaxuan/components/disCase/index.js
@@ -4,7 +4,7 @@
* 缁勪欢鐨勫睘鎬у垪琛�
*/
properties: {
-
+ menuButtonInfo: Object
},
data: {
activeIndex: -1,
@@ -15,6 +15,7 @@
cateList: [],
dataList: [],
+ total: 0,
pageNum: 1,
pageSize: 10,
query: '',
@@ -46,13 +47,30 @@
catalogCode,pageNum,pageSize,tagCodes, sortType,query
}).then(res => {
if(res.data){
- this.setData({ dataList: res.data.records })
+ this.setData({
+ total: res.data.total,
+ dataList: [...this.data.dataList, ...res.data.records],
+ })
}
})
+ },
+ scrolltolower() {
+ 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'
+ })
+ }
},
statusChange(e) {
const sortType = e.currentTarget.dataset.status
this.setData({sortType})
+ this.setData({ pageNum: 1,dataList: [],total: 0})
this.getList()
},
handleAction(e){
@@ -86,6 +104,7 @@
cateList[activeIndex].paramIndex = -1
cateList[activeIndex].paramName = ''
}
+ this.setData({ pageNum: 1,dataList: [],total: 0})
this.setData({ tagCodes, cateList })
console.log('tagCodes', tagCodes);
},
--
Gitblit v1.9.3