From 7d607f19253fcdbbf36d692894cee036af6c5de1 Mon Sep 17 00:00:00 2001
From: jiangping <jp@doumee.com>
Date: 星期一, 29 七月 2024 13:43:39 +0800
Subject: [PATCH] 提交
---
wechat_staff/pages/index/index.json | 1
wechat_staff/pages/productVideo/index.wxml | 2 +
wechat_staff/pages/productVideo/index.json | 1
wechat_staff/pages/index/index.js | 16 +++++---
wechat_staff/pages/index/index.wxml | 1
wechat_jiaxuan/pages/productVideo/index.wxml | 6 +-
wechat_jiaxuan/pages/index/index.wxml | 4 +-
wechat_jiaxuan/pages/productVideo/index.js | 11 ++++-
wechat_jiaxuan/pages/productVideo/index.json | 3 +
wechat_jiaxuan/pages/index/index.json | 1
wechat_staff/pages/productVideo/index.js | 10 +++-
wechat_jiaxuan/pages/index/index.js | 39 ++++++++++++++-----
12 files changed, 66 insertions(+), 29 deletions(-)
diff --git a/wechat_jiaxuan/pages/index/index.js b/wechat_jiaxuan/pages/index/index.js
index 2e777c9..2fad1b9 100644
--- a/wechat_jiaxuan/pages/index/index.js
+++ b/wechat_jiaxuan/pages/index/index.js
@@ -212,12 +212,16 @@
const {
videourl
} = e.currentTarget.dataset
- wx.previewMedia({
- sources: [{
- url: videourl,
- type: 'video'
- }]
- })
+ let videoPlay = this.selectComponent('.videoPlay');
+ if(videoPlay){
+ videoPlay.startPlayVideo(videourl,this );
+ }
+ // wx.previewMedia({
+ // sources: [{
+ // url: videourl,
+ // type: 'video'
+ // }]
+ // })
},
goserHeight: function (e) {
const serviceHeight = e.detail.height
@@ -242,14 +246,27 @@
})
},
consultClick(e) {
- const id = e.currentTarget.dataset.id
+ const item = e.currentTarget.dataset.id
actionDo({
actionType: 'view',
- id: id
+ id: item.id
})
- wx.navigateTo({
- url: '/pages/consult/detail?id=' + id
- })
+ if(item.contentType == 'link'){
+ wx.navigateTo({
+ url: '/pages/webView/index',
+ success: function(res) {
+ // 閫氳繃eventChannel鍚戣鎵撳紑椤甸潰浼犻�佹暟鎹�
+ res.eventChannel.emit('acceptDataFromOpenerPage', { link: item.content, title: item.title })
+ }
+ })
+ }else{
+ wx.navigateTo({
+ url: '/pages/consult/detail?id='+item.id,
+ })
+ }
+ // wx.navigateTo({
+ // url: '/pages/consult/detail?id=' + id
+ // })
},
bannerClick(e) {
const {
diff --git a/wechat_jiaxuan/pages/index/index.json b/wechat_jiaxuan/pages/index/index.json
index 0be5735..58b77f1 100644
--- a/wechat_jiaxuan/pages/index/index.json
+++ b/wechat_jiaxuan/pages/index/index.json
@@ -2,6 +2,7 @@
"usingComponents": {
"van-nav-bar": "@vant/weapp/nav-bar/index",
"authCard": "/components/authCard/authCard",
+ "videoPlay": "/components/videoPlay/index",
"van-popup": "@vant/weapp/popup/index"
},
"navigationStyle": "custom",
diff --git a/wechat_jiaxuan/pages/index/index.wxml b/wechat_jiaxuan/pages/index/index.wxml
index 96acd22..7998b24 100644
--- a/wechat_jiaxuan/pages/index/index.wxml
+++ b/wechat_jiaxuan/pages/index/index.wxml
@@ -107,7 +107,7 @@
</view>
<swiper class="consult_swiper" circular indicator-dots="{{ bannerSwiperOption.indicatorDots }}" autoplay="{{ bannerSwiperOption.autoplay }}" interval="{{ bannerSwiperOption.interval }}" style="height:{{consultImgHeight + 100}}rpx" duration="{{ bannerSwiperOption.duration }}">
<block wx:for="{{ consultList }}" wx:key="index">
- <swiper-item data-id="{{ item.id }}" bindtap="consultClick">
+ <swiper-item data-id="{{ item }}" bindtap="consultClick">
<image bindload="consultbindload" mode="aspectFill" src="{{ item.coverImage }}"></image>
<view class="scroll_text">{{ item.title }}</view>
</swiper-item>
@@ -139,5 +139,5 @@
</view>
<!-- active -->
<image class="active_baoming" data-type="2" bindtap="changePath" src="../../static/icon/ic_float_baoming@2x.png" mode="widthFix"></image>
-
+<videoPlay class="videoPlay"/>
</view>
\ No newline at end of file
diff --git a/wechat_jiaxuan/pages/productVideo/index.js b/wechat_jiaxuan/pages/productVideo/index.js
index 3915e21..cd4f618 100644
--- a/wechat_jiaxuan/pages/productVideo/index.js
+++ b/wechat_jiaxuan/pages/productVideo/index.js
@@ -50,8 +50,13 @@
})
},
itemClick(e) {
+
const { videourl } = e.currentTarget.dataset
- this.startPlayVideo(videourl)
+ let videoPlay = this.selectComponent('.videoPlay');
+ if(videoPlay){
+ videoPlay.startPlayVideo(videourl,this );
+ }
+ // this.startPlayVideo(videourl)
// wx.previewMedia({
// sources: [{ url: videourl, type: 'video' }]
@@ -69,8 +74,8 @@
},
onLoad(options) {
this.getTagList()
- this.getList()
- this.videoContext = wx.createVideoContext('myVideo')
+ this.getList()
+ this.videoContext = wx.createVideoContext('myVideo')
},
/**
diff --git a/wechat_jiaxuan/pages/productVideo/index.json b/wechat_jiaxuan/pages/productVideo/index.json
index 5f46ab7..d4dc588 100644
--- a/wechat_jiaxuan/pages/productVideo/index.json
+++ b/wechat_jiaxuan/pages/productVideo/index.json
@@ -1,7 +1,8 @@
{
"usingComponents": {
"van-overlay": "@vant/weapp/overlay/index" ,
- "van-popup": "@vant/weapp/popup/index"
+ "van-popup": "@vant/weapp/popup/index",
+ "videoPlay": "../../components/videoPlay/index"
},
"navigationBarTitleText": "浜у搧瑙嗛"
}
\ No newline at end of file
diff --git a/wechat_jiaxuan/pages/productVideo/index.wxml b/wechat_jiaxuan/pages/productVideo/index.wxml
index 8463b45..41fe112 100644
--- a/wechat_jiaxuan/pages/productVideo/index.wxml
+++ b/wechat_jiaxuan/pages/productVideo/index.wxml
@@ -33,10 +33,10 @@
<image class="default_empty" src="../../static/images/default_empty.png"></image>
</view>
</view>
- <view wx:if="{{ isShow }}" bind:tap="onClose" class="video_content">
+ <!-- <view wx:if="{{ isShow }}" bind:tap="onClose" class="video_content">
<view class="video">
<video id="myVideo" src="{{curVideoSrc}}" autoplay show-fullscreen-btn show-play-btn ></video>
</view>
- </view >
-
+ </view > -->
+ <videoPlay class='videoPlay' />
</view>
\ No newline at end of file
diff --git a/wechat_staff/pages/index/index.js b/wechat_staff/pages/index/index.js
index a1118ce..39f047c 100644
--- a/wechat_staff/pages/index/index.js
+++ b/wechat_staff/pages/index/index.js
@@ -130,12 +130,16 @@
const {
videourl
} = e.currentTarget.dataset
- wx.previewMedia({
- sources: [{
- url: videourl,
- type: 'video'
- }]
- })
+ let videoPlay = this.selectComponent('.videoPlay');
+ if(videoPlay){
+ videoPlay.startPlayVideo(videourl,this );
+ }
+ // wx.previewMedia({
+ // sources: [{
+ // url: videourl,
+ // type: 'video'
+ // }]
+ // })
},
seriveClick(e) {
const {
diff --git a/wechat_staff/pages/index/index.json b/wechat_staff/pages/index/index.json
index 96cd387..1e5e1ae 100644
--- a/wechat_staff/pages/index/index.json
+++ b/wechat_staff/pages/index/index.json
@@ -1,5 +1,6 @@
{
"usingComponents": {
+ "videoPlay": "/components/videoPlay/index",
"buoyClient": "../../components/buoyClient/index"
},
"navigationStyle": "custom"
diff --git a/wechat_staff/pages/index/index.wxml b/wechat_staff/pages/index/index.wxml
index ffd31f8..bc5f2c0 100644
--- a/wechat_staff/pages/index/index.wxml
+++ b/wechat_staff/pages/index/index.wxml
@@ -122,4 +122,5 @@
<view class="logo_wrap">
<image src="../../static/home_logo@2x.png" class="logo" mode="widthFix"></image>
</view>
+ <videoPlay class="videoPlay"/>
</view>
\ No newline at end of file
diff --git a/wechat_staff/pages/productVideo/index.js b/wechat_staff/pages/productVideo/index.js
index 49da278..96ad0ce 100644
--- a/wechat_staff/pages/productVideo/index.js
+++ b/wechat_staff/pages/productVideo/index.js
@@ -47,9 +47,13 @@
},
itemClick(e) {
const { videourl } = e.currentTarget.dataset
- wx.previewMedia({
- sources: [{ url: videourl, type: 'video' }]
- })
+ 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
diff --git a/wechat_staff/pages/productVideo/index.json b/wechat_staff/pages/productVideo/index.json
index 572cc92..9dde049 100644
--- a/wechat_staff/pages/productVideo/index.json
+++ b/wechat_staff/pages/productVideo/index.json
@@ -1,6 +1,7 @@
{
"navigationBarTitleText": "浜у搧瑙嗛",
"usingComponents": {
+ "videoPlay": "/components/videoPlay/index",
"buoyClient": "../../components/buoyClient/index"
}
}
\ No newline at end of file
diff --git a/wechat_staff/pages/productVideo/index.wxml b/wechat_staff/pages/productVideo/index.wxml
index a36c0bb..65f3489 100644
--- a/wechat_staff/pages/productVideo/index.wxml
+++ b/wechat_staff/pages/productVideo/index.wxml
@@ -31,4 +31,6 @@
</view>
</view>
</view>
+
+ <videoPlay class='videoPlay' />
</view>
\ No newline at end of file
--
Gitblit v1.9.3