From b5c218b2ed749a3e710c92c4770759773de4fc0c Mon Sep 17 00:00:00 2001
From: k94314517 <8417338+k94314517@user.noreply.gitee.com>
Date: 星期四, 01 八月 2024 18:25:19 +0800
Subject: [PATCH] 代码提交

---
 wechat_jiaxuan/pages/homeId/index.js |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/wechat_jiaxuan/pages/homeId/index.js b/wechat_jiaxuan/pages/homeId/index.js
index 196a830..c1732e0 100644
--- a/wechat_jiaxuan/pages/homeId/index.js
+++ b/wechat_jiaxuan/pages/homeId/index.js
@@ -60,6 +60,13 @@
   },
   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