From 491dfbf34606c4f421953b2c1924cf448393130e Mon Sep 17 00:00:00 2001
From: jiangping <jp@doumee.com>
Date: 星期一, 29 七月 2024 10:38:26 +0800
Subject: [PATCH] 提交
---
wechat_jiaxuan/pages/mine/mine.js | 9 ++
wechat_jiaxuan/pages/homeId/index.js | 2
wechat_jiaxuan/components/disRealpic/index.js | 4 +
wechat_jiaxuan/package-lock.json | 36 ++++--------
wechat_jiaxuan/pages/homeId/index.wxss | 1
wechat_jiaxuan/pages/productVideo/index.wxss | 18 ++++++
wechat_jiaxuan/pages/productVideo/index.wxml | 14 +++-
wechat_jiaxuan/pages/productVideo/index.js | 28 +++++++-
wechat_jiaxuan/pages/productVideo/index.json | 3
wechat_jiaxuan/pages/webView/index.js | 5 -
wechat_jiaxuan/pages/index/index.js | 2
11 files changed, 82 insertions(+), 40 deletions(-)
diff --git a/wechat_jiaxuan/components/disRealpic/index.js b/wechat_jiaxuan/components/disRealpic/index.js
index 95e7e49..6cf6ce7 100644
--- a/wechat_jiaxuan/components/disRealpic/index.js
+++ b/wechat_jiaxuan/components/disRealpic/index.js
@@ -112,6 +112,10 @@
if(item.openType == 'link'){
wx.navigateTo({
url: '/pages/webView/index?link=' + item.openContent,
+ success: function(res) {
+ // 閫氳繃eventChannel鍚戣鎵撳紑椤甸潰浼犻�佹暟鎹�
+ res.eventChannel.emit('acceptDataFromOpenerPage', { link: item.openContent})
+ }
})
}
if(item.openType == 'page'){
diff --git a/wechat_jiaxuan/package-lock.json b/wechat_jiaxuan/package-lock.json
index d942acc..f63da71 100644
--- a/wechat_jiaxuan/package-lock.json
+++ b/wechat_jiaxuan/package-lock.json
@@ -1,44 +1,32 @@
{
"name": "party",
"version": "1.0.0",
- "lockfileVersion": 3,
+ "lockfileVersion": 1,
"requires": true,
- "packages": {
- "": {
- "name": "party",
- "version": "1.0.0",
- "license": "ISC",
- "dependencies": {
- "@vant/area-data": "^1.1.3",
- "@vant/weapp": "^1.11.6",
- "hy-event-store": "^1.3.1",
- "mp-html": "^2.5.0",
- "vant-weapp": "^0.5.28"
- }
- },
- "node_modules/@vant/area-data": {
+ "dependencies": {
+ "@vant/area-data": {
"version": "1.5.1",
- "resolved": "https://registry.npmjs.org/@vant/area-data/-/area-data-1.5.1.tgz",
+ "resolved": "https://registry.npmmirror.com/@vant/area-data/-/area-data-1.5.1.tgz",
"integrity": "sha512-gR5TPEzTbxN1cTK1aDhCoyikSCLX7DAacxyXoKyI4SAsYYTZrDl/nLgQFIm9vLsvWzlPIda8xV8/U3x7M9k6ww=="
},
- "node_modules/@vant/weapp": {
+ "@vant/weapp": {
"version": "1.11.6",
- "resolved": "https://registry.npmjs.org/@vant/weapp/-/weapp-1.11.6.tgz",
+ "resolved": "https://registry.npmmirror.com/@vant/weapp/-/weapp-1.11.6.tgz",
"integrity": "sha512-a3heReWYT2gNdsyj6x1hBwsM8V8NrjcPAmle86NH2CD2V/i/h0le75piW6KntSfOPCwekVWMBKhysNrBpJeKdw=="
},
- "node_modules/hy-event-store": {
+ "hy-event-store": {
"version": "1.3.1",
- "resolved": "https://registry.npmjs.org/hy-event-store/-/hy-event-store-1.3.1.tgz",
+ "resolved": "https://registry.npmmirror.com/hy-event-store/-/hy-event-store-1.3.1.tgz",
"integrity": "sha512-uD+14mz4ONiAs9cX/csjUJ2pHTPFciE3JvIbZ+lsbaXopZWbnETEjwJ0a4l5GqNGcltcW3gJjlnUXCJPBoABfg=="
},
- "node_modules/mp-html": {
+ "mp-html": {
"version": "2.5.0",
- "resolved": "https://registry.npmjs.org/mp-html/-/mp-html-2.5.0.tgz",
+ "resolved": "https://registry.npmmirror.com/mp-html/-/mp-html-2.5.0.tgz",
"integrity": "sha512-uvBH5tIaDIlj8qaxsvNXU3RKX0jvXOo3J6FAi/notUv/ds6j79UUTE82aDkxxUk0eLUU0CiCqMrR7WWnytk30Q=="
},
- "node_modules/vant-weapp": {
+ "vant-weapp": {
"version": "0.5.29",
- "resolved": "https://registry.npmjs.org/vant-weapp/-/vant-weapp-0.5.29.tgz",
+ "resolved": "https://registry.npmmirror.com/vant-weapp/-/vant-weapp-0.5.29.tgz",
"integrity": "sha512-RMc0Ga914XFwspw2WuOMU8bOHlIkua8X1DoQ/KPnGQzjwT1uEL4S7W186EmaHF1wN2krB9BVd0LdRRt39dGh6Q=="
}
}
diff --git a/wechat_jiaxuan/pages/homeId/index.js b/wechat_jiaxuan/pages/homeId/index.js
index 03b2ca0..792b2b2 100644
--- a/wechat_jiaxuan/pages/homeId/index.js
+++ b/wechat_jiaxuan/pages/homeId/index.js
@@ -70,7 +70,7 @@
url: '/pages/webView/index',
success: function(res) {
console.log('鍙戝嚭浜嬩欢');
- res.eventChannel.emit('data',{link:item.content} );
+ res.eventChannel.emit('acceptDataFromOpenerPage',{link:item.content} );
}
})
}
diff --git a/wechat_jiaxuan/pages/homeId/index.wxss b/wechat_jiaxuan/pages/homeId/index.wxss
index 14329e9..08b9f05 100644
--- a/wechat_jiaxuan/pages/homeId/index.wxss
+++ b/wechat_jiaxuan/pages/homeId/index.wxss
@@ -2,6 +2,7 @@
background-color: #fff;
}
.home_tabs {
+ width: 100%;
height: 80rpx;
position: fixed;
background-color: #fff;
diff --git a/wechat_jiaxuan/pages/index/index.js b/wechat_jiaxuan/pages/index/index.js
index 003f46a..2e777c9 100644
--- a/wechat_jiaxuan/pages/index/index.js
+++ b/wechat_jiaxuan/pages/index/index.js
@@ -275,7 +275,7 @@
wx.navigateTo({
url: '/pages/webView/index',
success: function (res) {
- res.eventChannel.emit('data', {
+ res.eventChannel.emit('acceptDataFromOpenerPage', {
link: item.openContent || item.content
});
}
diff --git a/wechat_jiaxuan/pages/mine/mine.js b/wechat_jiaxuan/pages/mine/mine.js
index 948e272..f94275b 100644
--- a/wechat_jiaxuan/pages/mine/mine.js
+++ b/wechat_jiaxuan/pages/mine/mine.js
@@ -57,7 +57,14 @@
let temp = ['mysub', 'collect', 'favorite','index']
const index = e.currentTarget.dataset.index
if(index == '4'){
-
+ wx.navigateToMiniProgram({
+ appId: 'wx9910433b937fff92',
+ path: '',
+ envVersion: 'trial',
+ extraData: {
+ origin: 'c'
+ }
+ })
}
if(index == '5'){
wx.navigateTo({
diff --git a/wechat_jiaxuan/pages/productVideo/index.js b/wechat_jiaxuan/pages/productVideo/index.js
index 4db093b..3915e21 100644
--- a/wechat_jiaxuan/pages/productVideo/index.js
+++ b/wechat_jiaxuan/pages/productVideo/index.js
@@ -5,11 +5,13 @@
* 椤甸潰鐨勫垵濮嬫暟鎹�
*/
data: {
+ videoContext:null,
category: [],
tagCodes: '',
videoUrl: '',
showVideo: false,
-
+ isShow:false,
+ curVideoSrc:'',
dataList: [],
total: 0,
pageSize: 10,
@@ -48,10 +50,12 @@
})
},
itemClick(e) {
- const { videourl } = e.currentTarget.dataset
- wx.previewMedia({
- sources: [{ url: videourl, type: 'video' }]
- })
+ const { videourl } = e.currentTarget.dataset
+ this.startPlayVideo(videourl)
+
+ // wx.previewMedia({
+ // sources: [{ url: videourl, type: 'video' }]
+ // })
},
cateClick(e) {
const { code } = e.target.dataset
@@ -66,6 +70,7 @@
onLoad(options) {
this.getTagList()
this.getList()
+ this.videoContext = wx.createVideoContext('myVideo')
},
/**
@@ -107,5 +112,18 @@
*/
onShareAppMessage() {
+ },
+ startPlayVideo(videourl){
+ this.setData({isShow:true, curVideoSrc:videourl})
+ console.log(videourl)
+ this.videoContext.requestFullScreen({
+ // direction: 0
+ });
+ },
+ onClose(){
+ this.setData({isShow:false})
+ if(this.videoContext){
+ this.videoContext.exitFullScreen()
+ }
}
})
\ No newline at end of file
diff --git a/wechat_jiaxuan/pages/productVideo/index.json b/wechat_jiaxuan/pages/productVideo/index.json
index 121b10c..5f46ab7 100644
--- a/wechat_jiaxuan/pages/productVideo/index.json
+++ b/wechat_jiaxuan/pages/productVideo/index.json
@@ -1,6 +1,7 @@
{
"usingComponents": {
- "van-overlay": "@vant/weapp/overlay/index"
+ "van-overlay": "@vant/weapp/overlay/index" ,
+ "van-popup": "@vant/weapp/popup/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 31b55bd..8463b45 100644
--- a/wechat_jiaxuan/pages/productVideo/index.wxml
+++ b/wechat_jiaxuan/pages/productVideo/index.wxml
@@ -1,7 +1,7 @@
-<view class="container">
+<view class="container" >
<!-- 鍒嗙被 -->
<view>
- <scroll-view scroll-x="true" style="weight: 710rpx;margin-bottom: 30rpx;">
+ <scroll-view scroll-x="true" style="width: 710rpx;margin-bottom: 30rpx;" >
<view class="scroll_cate">
<view bindtap="cateClick" data-code="{{item.labelCode}}" wx:for="{{ category }}" class="item {{ tagCodes == item.labelCode ? 'active': '' }}">{{ item.labelName }}</view>
</view>
@@ -13,7 +13,7 @@
</scroll-view> -->
</view>
<!-- content -->
- <view class="content">
+ <view class="content" >
<view wx:for="{{ dataList }}" class="item">
<view class="img_wrap">
<image class="img" src="{{ item.coverImage }}" mode="aspectFill"></image>
@@ -32,5 +32,11 @@
<view wx:if="{{ dataList.length == 0 }}" class="empty_wrap">
<image class="default_empty" src="../../static/images/default_empty.png"></image>
</view>
- </view>
+ </view>
+ <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>
\ No newline at end of file
diff --git a/wechat_jiaxuan/pages/productVideo/index.wxss b/wechat_jiaxuan/pages/productVideo/index.wxss
index 5e34d88..cf43650 100644
--- a/wechat_jiaxuan/pages/productVideo/index.wxss
+++ b/wechat_jiaxuan/pages/productVideo/index.wxss
@@ -99,3 +99,21 @@
top: 50%;
transform: translate(0, -50%);
}
+.video_content{
+ position: absolute;
+ top: 10rpx;
+ left: 0;
+ width: 100%;
+ height: 100%;
+ background-color: rgba(0, 0, 0, 0.2);
+ z-index: 9999;
+}
+.video_content .video{
+ position: fixed;
+ border-radius: 8rpx;
+ top: 50%;
+ left: 75rpx;
+ transform: translate(0, -50%);
+ width: 600rpx;
+ z-index: 10000;
+}
\ No newline at end of file
diff --git a/wechat_jiaxuan/pages/webView/index.js b/wechat_jiaxuan/pages/webView/index.js
index e0ab7d4..5c21ada 100644
--- a/wechat_jiaxuan/pages/webView/index.js
+++ b/wechat_jiaxuan/pages/webView/index.js
@@ -12,9 +12,8 @@
link: ''
},
onLoad: function (options) {
- let that = this
- const eventChannel = this.getOpenerEventChannel()
-
+ let that = this
+ const eventChannel = this.getOpenerEventChannel()
eventChannel.on('acceptDataFromOpenerPage', function(data) {
console.log('鍙傛暟', data)
if (data.title) wx.setNavigationBarTitle({ title: data.title })
--
Gitblit v1.9.3