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 |   27 ++++++++++++++++++---------
 1 files changed, 18 insertions(+), 9 deletions(-)

diff --git a/wechat_jiaxuan/pages/productVideo/index.js b/wechat_jiaxuan/pages/productVideo/index.js
index cd4f618..365508d 100644
--- a/wechat_jiaxuan/pages/productVideo/index.js
+++ b/wechat_jiaxuan/pages/productVideo/index.js
@@ -1,4 +1,4 @@
-import { getZhongTaiVideoPage, getCataLogTagList } from '../../api/index'
+import { getZhongTaiVideoPage, actionDo, getCataLogTagList } from '../../api/index'
 Page({
 
   /**
@@ -50,14 +50,23 @@
     })
   },
   itemClick(e) {
- 
-    const { videourl } = e.currentTarget.dataset 
-    let videoPlay = this.selectComponent('.videoPlay'); 
-    if(videoPlay){ 
-      videoPlay.startPlayVideo(videourl,this );
-    }
-    // this.startPlayVideo(videourl)
-
+    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
+    })
+    // 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