Commit e2a19b99 authored by Mac's avatar Mac

1

parent 565ccaed
......@@ -3,13 +3,32 @@
'background-image': 'url(' + (video.backgroundimage ? video.backgroundimage : '') + ')', backgroundSize: '100% 100%'
}">
<view class="video-xbox" :style="{
'paddingLeft':video.left+'px',
'paddingRight':video.right+'px',
'paddingTop':video.top+'px',
'paddingBottom':video.bottom+'px',
'paddingLeft':video.left+'rpx',
'paddingRight':video.right+'rpx',
'paddingTop':video.top+'rpx',
'paddingBottom':video.bottom+'rpx',
}">
<video :src="video.url" :style="{'width':'100%','height':'100%','border-radius':video.radius+'px'}" :poster="video.pic_url" :show-fullscreen-btn='video.isfullscreen'></video>
<video :src="video.url"
:style="{'width':'100%','height':'100%','border-radius':video.radius+'px'}"
:poster="video.pic_url"
:show-center-play-btn='false'
:id="'myVideo'+index"
@fullscreenchange='videoControl'
>
</video>
<view v-if="show==true" class="zzao"
:style="{
'paddingLeft':video.left+'rpx',
'paddingRight':video.right+'rpx',
'paddingTop':video.top+'rpx',
'paddingBottom':video.bottom+'rpx',
}"
@click="enlarge()">
<u-icon name="play-circle-o" :size="50" color="#FFF"></u-icon>
</view>
</view>
</div>
......@@ -17,7 +36,47 @@
<script>
export default {
props: ["video"]
props: ["video",'index'],
data(){
return{
show:true
}
},
created() {
},
mounted() {
this.videoContext = uni.createVideoContext('myVideo'+this.index,this);
},
methods:{
enlarge(){
console.log(this.videoContext)
this.show = false;
console.log(this.video.isfullscreen)
if(this.video.isfullscreen == true){
console.log('进入全屏')
this.videoContext.requestFullScreen({
direction:0,
})
}else{
console.log('不是全屏播放')
this.videoContext.play()
}
},
videoControl(e){
if(e.detail.fullScreen==false){
this.videoContext.stop()
if(this.video.isfullscreen==true){
this.show = true;
}
}else{
this.videoContext.play()
}
}
}
};
</script>
......@@ -30,6 +89,10 @@ export default {
.video-xbox{
width: 100%;
height: 100%;
position: relative;
}
.zzao{
width: 100%;height: 100%;position: absolute;left: 0;top: 0;display: flex;align-items: center;justify-content: center;
}
</style>
\ No newline at end of file
......@@ -4,12 +4,12 @@
<view style="width: 22px; margin: auto;"><u-icon name="cart-o" size="44" :color="mc"></u-icon></view>
<text class="text" :style="{ color: mc }">购物车</text>
</view>
<view class="item" v-if="formid!=1">
<view class="item" >
<view style="width: 22px; margin: auto;"><u-icon name="chat-o" size="44" color="#333"></u-icon></view>
<text class="text">客服</text>
<button open-type="contact" :send-message-title="goodName" :send-message-path="path" :send-message-img="g.coverPic" :show-message-card="true">0</button>
</view>
<view class="item" @click="setFavorite" v-if="formid!=1">
<view class="item" @click="setFavorite" >
<view style="width: 22px; margin: auto;"><u-icon :name="favorStatus ? 'like' : 'like-o'" size="44" :color="favorStatus ? mc : '#333'"></u-icon></view>
<text class="text">收藏</text>
</view>
......
......@@ -32,7 +32,7 @@
<notice v-if="d.id == 'notice'" :notice="d.data" :key="di"></notice>
<gridnav v-if="d.id == 'nav'" :navs="d.data" :key="di"></gridnav>
<pagetitle v-if="d.id == 'link'" :ts="d.data" :key="di"></pagetitle>
<videopage v-if="d.id == 'video'" :video="d.data" :key="di"></videopage>
<videopage v-if="d.id == 'video'" :video="d.data" :index='di' :key="di"></videopage>
<copyright v-if="d.id == 'copyright'" :cop="d.data" :key="di"></copyright>
<checkin v-if="d.id == 'check-in'" :check="d.data" :key="di"></checkin>
<userbox v-if="d.id == 'user-info'" :ts="d.data" :key="di"></userbox>
......
......@@ -154,9 +154,13 @@
<text style="font-size: 16px;color: #1B1D1E;margin-left: 5px;">擅长课程</text>
</view>
<view style="width: 100%;padding:8px 15px;" class="teacherbox-b">
<view class="teacher-b-item2" :style="{background:mc,}" v-for="(x, i) in teacher.teacherResult.GoodCourseList" :key="ci">
<view class="teacher-b-item2" :style="{background:mc,}" v-for="(x, i) in teacher.teacherResult.GoodCourseList" :key="ci" v-if="teacher.teacherResult.GoodCourseList.length>0">
{{x}}
</view>
<!-- <u-empty text="暂无课程" font-size="36" mode="list" ></u-empty> -->
<view v-if='teacher.teacherResult.GoodCourseList.length==0' style="width: 100%;height: 50px;display: flex;align-items: center;justify-content: center;color:#c0c4cc ;">
暂无擅长课程
</view>
</view>
<view class="tiaoti">
<view class="tiaoti-l"></view>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment