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/disRealpic/index.js | 22 ++++++++++++++++++++--
1 files changed, 20 insertions(+), 2 deletions(-)
diff --git a/wechat_jiaxuan/components/disRealpic/index.js b/wechat_jiaxuan/components/disRealpic/index.js
index e836e5e..0d4116a 100644
--- a/wechat_jiaxuan/components/disRealpic/index.js
+++ b/wechat_jiaxuan/components/disRealpic/index.js
@@ -4,7 +4,7 @@
* 缁勪欢鐨勫睘鎬у垪琛�
*/
properties: {
-
+ menuButtonInfo: Object
},
data: {
activeIndex: -1,
@@ -45,8 +45,24 @@
getZhongTaiRealcasePage({
catalogCode,tagCodes,pageNum,pageSize, sortType,query
}).then(res => {
- this.setData({ dataList: res.data.records })
+ this.setData({
+ dataList: [...this.data.dataList, ...res.data.records],
+ total: res.data.total,
+ })
})
+ },
+ 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'
+ })
+ }
},
videoClick(e) {
const { videourl } = e.currentTarget.dataset
@@ -68,6 +84,7 @@
statusChange(e) {
const sortType = e.currentTarget.dataset.status
this.setData({sortType})
+ this.setData({ pageNum: 1,dataList: [],total: 0})
this.getList()
},
handleAction(e){
@@ -114,6 +131,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