fanfan 5 months ago
parent 2170a39cec
commit 9a864cd1fc
  1. 10
      pages/merchantTutorial/lookVideo.vue
  2. 6
      pages/merchantTutorial/tutorial.vue

@ -7,7 +7,7 @@
<view class="warp" @click.stop="pauseVideo"> <view class="warp" @click.stop="pauseVideo">
<video @tap.stop style="width: 100%;" :loop='true' id="myVideo" :src="video_url"></video> <video @tap.stop style="width: 100%;" :loop='true' id="myVideo" :src="video_url"></video>
<view class="share"> <view class="share">
<button @click.stop="lookVideo" class="buttons"> 复制视频链接</button> <button @click.stop="lookVideo" class="buttons"> 复制分享好友</button>
</view> </view>
</view> </view>
</u-mask> </u-mask>
@ -21,7 +21,8 @@
background: { background: {
background: 'none' background: 'none'
}, },
video_url: '' video_url: '',
title: ''
} }
}, },
@ -29,7 +30,8 @@
this.show = true; this.show = true;
let videoContext = wx.createVideoContext('myVideo') let videoContext = wx.createVideoContext('myVideo')
videoContext.seek(0); videoContext.seek(0);
this.video_url = options.url this.video_url = options.url;
this.title = options.title
}, },
onShow() { onShow() {
@ -58,7 +60,7 @@
methods: { methods: {
lookVideo() { lookVideo() {
let str = let str =
`App内视频教程】:如何用易创相机开启抖音直播\n【点开学习】\n${this.video_url}(温馨提示:App教程内可以搜索你想要的内容,让你学习更加方便)` `小程序内商家教程视频】:${this.title}\n【点开学习】\n${this.video_url}(温馨提示:小程序商家教程内可以搜索你想要的内容,让你学习更加方便)`
uni.setClipboardData({ uni.setClipboardData({
data: str, // value data: str, // value
success: function() { success: function() {

@ -20,7 +20,7 @@
bar-width="55" bar-height="6" :current="current" @change="change"> bar-width="55" bar-height="6" :current="current" @change="change">
</u-tabs> </u-tabs>
<view class="center-box" v-if="courseList.length>0"> <view class="center-box" v-if="courseList.length>0">
<view class="list" v-for="(a,i) in courseList" :key="i" @click="onLookCord(a.video_url.external_url)"> <view class="list" v-for="(a,i) in courseList" :key="i" @click="onLookCord(a.video_url.external_url,a.course_name)">
<image :src="a.image_url?a.image_url.external_url:''" mode="heightFix" class="img"></image> <image :src="a.image_url?a.image_url.external_url:''" mode="heightFix" class="img"></image>
<view class="infor"> <view class="infor">
<view class="title"> <view class="title">
@ -102,10 +102,10 @@
this.current = index; this.current = index;
this.getCourseList() this.getCourseList()
}, },
onLookCord(url) { onLookCord(url,title) {
if (url) { if (url) {
uni.navigateTo({ uni.navigateTo({
url: "/pages/merchantTutorial/lookVideo?url=" + url url: "/pages/merchantTutorial/lookVideo?url=" + url+"&title="+title
}) })
// this.show = true; // this.show = true;
// let videoContext = wx.createVideoContext('myVideo') // let videoContext = wx.createVideoContext('myVideo')

Loading…
Cancel
Save