From 1cee3a660c5f8e5f4290ae894c2898c4966a834d Mon Sep 17 00:00:00 2001
From: liukangdong <898885815@qq.com>
Date: 星期五, 02 八月 2024 18:33:33 +0800
Subject: [PATCH] ''

---
 wechat_jiaxuan/pages/productVideo/index.js |   25 ++++++++++++-------------
 1 files changed, 12 insertions(+), 13 deletions(-)

diff --git a/wechat_jiaxuan/pages/productVideo/index.js b/wechat_jiaxuan/pages/productVideo/index.js
index 1209c01..365508d 100644
--- a/wechat_jiaxuan/pages/productVideo/index.js
+++ b/wechat_jiaxuan/pages/productVideo/index.js
@@ -50,23 +50,22 @@
     })
   },
   itemClick(e) {
- 
-    const { videourl ,id} = e.currentTarget.dataset 
+    const { id} = e.currentTarget.dataset.item
+    const { dataList } = this.data
+    dataList.forEach(ite => {
+      if(id === ite.id){
+        ite.viewCount += 1
+      }
+    })
+    this.setData({ dataList })
     actionDo({
       actionType: 'view',
       id: id
     })
-    var dataList = this.data.dataList;
-    dataList.forEach(item =>{
-       if(item.id == id){
-         item.viewCount = (item.viewCount||0) +1 
-        }
-    })
-    this.setData({dataList:dataList})
-    let videoPlay = this.selectComponent('.videoPlay'); 
-    if(videoPlay){ 
-      videoPlay.startPlayVideo(videourl,this );
-    }
+    // let videoPlay = this.selectComponent('.videoPlay'); 
+    // if(videoPlay){ 
+    //   videoPlay.startPlayVideo(videourl,this );
+    // }
     // this.startPlayVideo(videourl) 
     // wx.previewMedia({
     //   sources: [{ url: videourl, type: 'video' }]

--
Gitblit v1.9.3