|
@@ -1,7 +1,7 @@
|
|
<template>
|
|
<template>
|
|
<view class="content" v-if="content">
|
|
<view class="content" v-if="content">
|
|
<view class="acitve-content">
|
|
<view class="acitve-content">
|
|
- <video autoplay :src="content" controls></video>
|
|
|
|
|
|
+ <video id="myvideo" autoplay direction="0" @fullscreenchange="fullscreenchange" :title="title" :src="content" controls></video>
|
|
</view>
|
|
</view>
|
|
<view class="titles">{{title}}</view>
|
|
<view class="titles">{{title}}</view>
|
|
</view>
|
|
</view>
|
|
@@ -21,12 +21,22 @@
|
|
if(opts.form=='videoList'){
|
|
if(opts.form=='videoList'){
|
|
this.title = opts.title
|
|
this.title = opts.title
|
|
this.content = opts.content
|
|
this.content = opts.content
|
|
|
|
+ this.videoFull()
|
|
}else{
|
|
}else{
|
|
this.id = opts.sn
|
|
this.id = opts.sn
|
|
this.getDetail()
|
|
this.getDetail()
|
|
}
|
|
}
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
|
|
+ fullscreenchange(e, direction){
|
|
|
|
+ if(!e.detail.fullScreen){
|
|
|
|
+ uni.navigateBack()
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ videoFull(){
|
|
|
|
+ const videos = uni.createVideoContext('myvideo',this)
|
|
|
|
+ videos.requestFullScreen()
|
|
|
|
+ },
|
|
getDetail(){
|
|
getDetail(){
|
|
promoTerminalDetail({sn:this.id}).then(res => {
|
|
promoTerminalDetail({sn:this.id}).then(res => {
|
|
this.title = res.data.name
|
|
this.title = res.data.name
|
|
@@ -34,6 +44,7 @@
|
|
uni.setNavigationBarTitle({
|
|
uni.setNavigationBarTitle({
|
|
title: res.data.name || '活动内容'
|
|
title: res.data.name || '活动内容'
|
|
})
|
|
})
|
|
|
|
+ this.videoFull()
|
|
})
|
|
})
|
|
}
|
|
}
|
|
}
|
|
}
|