From 7dc29ed74ebaa8a0e66f68264d9a13f95dc3af21 Mon Sep 17 00:00:00 2001
From: jiangping <jp@doumee.com>
Date: 星期五, 02 八月 2024 11:09:06 +0800
Subject: [PATCH] aa

---
 wechat_staff/pages/homeId/index.js |   16 ++++++++++++----
 1 files changed, 12 insertions(+), 4 deletions(-)

diff --git a/wechat_staff/pages/homeId/index.js b/wechat_staff/pages/homeId/index.js
index 0a7dded..e5d99fe 100644
--- a/wechat_staff/pages/homeId/index.js
+++ b/wechat_staff/pages/homeId/index.js
@@ -23,6 +23,11 @@
     this.getTabList()
     this.getList()
   },
+  onPullDownRefresh() {
+    this.setData({ dataList: [], pageNum: 1, total: 0 })
+    wx.stopPullDownRefresh()
+    this.getList()
+  },
   onReachBottom() {
     console.log('瑙﹀簳浜嬩欢');
     const { total, dataList, pageNum } = this.data
@@ -52,7 +57,13 @@
   },
   itemClick(e) {
     const item = e.currentTarget.dataset.item
-    console.log('item', item);
+    const { dataList } = this.data
+    dataList.forEach(ite => {
+      if(item.id === ite.id){
+        ite.viewCount += 1
+      }
+    })
+    this.setData({ dataList })
     if(item.contentType == 'video'){
       wx.previewMedia({
         sources: [{ url: item.content, type: 'video' }]
@@ -126,9 +137,6 @@
   /**
    * 椤甸潰鐩稿叧浜嬩欢澶勭悊鍑芥暟--鐩戝惉鐢ㄦ埛涓嬫媺鍔ㄤ綔
    */
-  onPullDownRefresh() {
-
-  },
 
   /**
    * 椤甸潰涓婃媺瑙﹀簳浜嬩欢鐨勫鐞嗗嚱鏁�

--
Gitblit v1.9.3