From e0adf6c49fdc18990bc8426b5dcafce4be03e014 Mon Sep 17 00:00:00 2001
From: jiangping <jp@doumee.com>
Date: 星期二, 30 七月 2024 13:55:40 +0800
Subject: [PATCH] 提交
---
wechat_staff/pages/productVideo/index.wxml | 2 +-
wechat_jiaxuan/pages/productVideo/index.wxml | 2 +-
wechat_jiaxuan/pages/productVideo/index.js | 18 ++++++++++++++----
wechat_staff/components/detailFooter/index.js | 8 ++++----
wechat_staff/pages/productVideo/index.js | 15 +++++++++++++--
5 files changed, 33 insertions(+), 12 deletions(-)
diff --git a/wechat_jiaxuan/pages/productVideo/index.js b/wechat_jiaxuan/pages/productVideo/index.js
index cd4f618..1209c01 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({
/**
@@ -51,13 +51,23 @@
},
itemClick(e) {
- const { videourl } = e.currentTarget.dataset
+ 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 );
}
- // this.startPlayVideo(videourl)
-
+ // this.startPlayVideo(videourl)
// wx.previewMedia({
// sources: [{ url: videourl, type: 'video' }]
// })
diff --git a/wechat_jiaxuan/pages/productVideo/index.wxml b/wechat_jiaxuan/pages/productVideo/index.wxml
index 41fe112..f481144 100644
--- a/wechat_jiaxuan/pages/productVideo/index.wxml
+++ b/wechat_jiaxuan/pages/productVideo/index.wxml
@@ -17,7 +17,7 @@
<view wx:for="{{ dataList }}" class="item">
<view class="img_wrap">
<image class="img" src="{{ item.coverImage }}" mode="aspectFill"></image>
- <image bindtap="itemClick" data-videourl="{{ item.videoUrl }}" class="play" src="../../static/icon/ic_play.png" mode="widthFix"></image>
+ <image bindtap="itemClick" data-videourl="{{ item.videoUrl }}" data-id="{{ item.id }}" class="play" src="../../static/icon/ic_play.png" mode="widthFix"></image>
</view>
<view class="title">{{ item.title }}</view>
diff --git a/wechat_staff/components/detailFooter/index.js b/wechat_staff/components/detailFooter/index.js
index b26816a..4bc7482 100644
--- a/wechat_staff/components/detailFooter/index.js
+++ b/wechat_staff/components/detailFooter/index.js
@@ -31,10 +31,10 @@
methods: {
handleShare() {
let map = [
- '/pages/detailDis/product',
- '/pages/detailDis/case',
- '/pages/detailDis/realpic',
- '/pages/consult/detail',
+ '/pages/detailDis/product',//浜у搧璇︽儏
+ '/pages/detailDis/case',//妗堜緥璇︽儏
+ '/pages/detailDis/realpic',//瀹炴櫙璇︽儏
+ '/pages/consult/detail',//璧勮璇︽儏
]
const { info, path} = this.data
wx.navigateToMiniProgram({
diff --git a/wechat_staff/pages/productVideo/index.js b/wechat_staff/pages/productVideo/index.js
index 96ad0ce..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,7 +46,18 @@
})
},
itemClick(e) {
- const { videourl } = e.currentTarget.dataset
+ 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 );
diff --git a/wechat_staff/pages/productVideo/index.wxml b/wechat_staff/pages/productVideo/index.wxml
index 65f3489..b9ef53a 100644
--- a/wechat_staff/pages/productVideo/index.wxml
+++ b/wechat_staff/pages/productVideo/index.wxml
@@ -18,7 +18,7 @@
<view wx:for="{{ dataList }}" class="item">
<view class="img_wrap">
<image class="img" src="{{ item.coverImage }}" mode="widthFix"></image>
- <image bindtap="itemClick" data-videourl="{{ item.videoUrl }}" class="play" src="../../static/icon/ic_play.png" mode="widthFix"></image>
+ <image bindtap="itemClick" data-videourl="{{ item.videoUrl }}" data-id="{{ item.id }}" class="play" src="../../static/icon/ic_play.png" mode="widthFix"></image>
</view>
<view class="title">{{ item.title }}</view>
--
Gitblit v1.9.3