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_jiaxuan/pages/productVideo/index.js |   19 ++++++++++++++-----
 1 files changed, 14 insertions(+), 5 deletions(-)

diff --git a/wechat_jiaxuan/pages/productVideo/index.js b/wechat_jiaxuan/pages/productVideo/index.js
index cd4f618..61ab302 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 
+    const { videourl ,id} = e.currentTarget.dataset 
+    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)
-
+    // this.startPlayVideo(videourl) 
     // wx.previewMedia({
     //   sources: [{ url: videourl, type: 'video' }]
     // })

--
Gitblit v1.9.3