From 3508c76f824c6632b47aff17b1ec2f2a11c504fc Mon Sep 17 00:00:00 2001
From: liukangdong <898885815@qq.com>
Date: 星期四, 01 八月 2024 14:31:12 +0800
Subject: [PATCH] lll

---
 wechat_jiaxuan/pages/consult/consult.js |   14 ++++++++------
 1 files changed, 8 insertions(+), 6 deletions(-)

diff --git a/wechat_jiaxuan/pages/consult/consult.js b/wechat_jiaxuan/pages/consult/consult.js
index 1da566b..81f1f32 100644
--- a/wechat_jiaxuan/pages/consult/consult.js
+++ b/wechat_jiaxuan/pages/consult/consult.js
@@ -35,11 +35,6 @@
       })
     }
   },
-  onPullDownRefresh: function () {
-    console.log('涓嬫媺鍒锋柊');
-    this.setData({ dataList: [], pageNum: 1, total: 0 })
-    this.getList()
-  },
   getCate() {
     getCatalogList({catalogCode: 'product_info'}).then(res => {
       this.setData({ category: res.data })
@@ -62,13 +57,20 @@
   },
   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 })
     actionDo({actionType: 'view',id: item.id})
     if(item.contentType == 'link'){
       wx.navigateTo({
         url: '/pages/webView/index',
         success: function(res) {
           // 閫氳繃eventChannel鍚戣鎵撳紑椤甸潰浼犻�佹暟鎹�
-          res.eventChannel.emit('acceptDataFromOpenerPage', { link: item.openContent, title: item.title })
+          res.eventChannel.emit('acceptDataFromOpenerPage', { link: item.content, title: item.title })
         }
       })
     }else{

--
Gitblit v1.9.3