From 2c08a98f7e85ec7c9376f27a7933e75e44d672f7 Mon Sep 17 00:00:00 2001
From: liukangdong <898885815@qq.com>
Date: 星期二, 27 八月 2024 15:52:59 +0800
Subject: [PATCH] ll
---
wechat_jiaxuan/pages/homeId/index.js | 10 ++++++++++
1 files changed, 10 insertions(+), 0 deletions(-)
diff --git a/wechat_jiaxuan/pages/homeId/index.js b/wechat_jiaxuan/pages/homeId/index.js
index 792b2b2..c1732e0 100644
--- a/wechat_jiaxuan/pages/homeId/index.js
+++ b/wechat_jiaxuan/pages/homeId/index.js
@@ -39,6 +39,7 @@
onPullDownRefresh: function () {
console.log('涓嬫媺鍒锋柊');
this.setData({ dataList: [], pageNum: 1, total: 0 })
+ wx.stopPullDownRefresh()
this.getList()
},
getList(){
@@ -53,10 +54,19 @@
total: res.data.total,
dataList: [ ...this.data.dataList, ...res.data.records ]
})
+ }).finally(()=>{
+ wx.stopPullDownRefresh()
})
},
itemClick(e) {
const item = e.currentTarget.dataset.item
+ const { dataList } = this.data
+ dataList.forEach(ite => {
+ if(item.id === ite.id){
+ ite.viewCount += 1
+ }
+ })
+ this.setData({ dataList })
if(item.contentType){
actionDo({actionType: 'view',id: item.id})
}
--
Gitblit v1.9.3