From b022834cf81ea67a6f28d31cc057d494ac6dc8ed Mon Sep 17 00:00:00 2001
From: jiangping <jp@doumee.com>
Date: 星期二, 30 七月 2024 14:03:02 +0800
Subject: [PATCH] 提交
---
wechat_staff/pages/productVideo/index.js | 23 +++++++++++++++++++----
1 files changed, 19 insertions(+), 4 deletions(-)
diff --git a/wechat_staff/pages/productVideo/index.js b/wechat_staff/pages/productVideo/index.js
index 49da278..b0a9afb 100644
--- a/wechat_staff/pages/productVideo/index.js
+++ b/wechat_staff/pages/productVideo/index.js
@@ -1,4 +1,4 @@
-import { getZhongTaiVideoPage, getCataLogTagList ,refreshEnjoy} from '../../api/index'
+import { getZhongTaiVideoPage, actionDo, getCataLogTagList ,refreshEnjoy} from '../../api/index'
Page({
/**
@@ -46,10 +46,25 @@
})
},
itemClick(e) {
- const { videourl } = e.currentTarget.dataset
- wx.previewMedia({
- sources: [{ url: videourl, type: 'video' }]
+ const { videourl, id } = e.currentTarget.dataset
+ 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 );
+ }
+ // wx.previewMedia({
+ // sources: [{ url: videourl, type: 'video' }]
+ // })
},
cateClick(e) {
const { code } = e.target.dataset
--
Gitblit v1.9.3