Commit 7b66b442 authored by Mac's avatar Mac

1

parent 604b2865
......@@ -131,7 +131,9 @@
.areagood-r{
width: 1;
flex:1;
margin-left: 10px;
margin-left: 10px;
max-height: 300px;
overflow-y: auto;
}
.friendcircle .comment{
width: 100%;
......@@ -235,7 +237,7 @@
</view>
</view>
<u-empty v-if="g.length == 0" text="暂无动态" mode="list"></u-empty>
<view v-if="g.length > 0" :style="{'width':'100vw','overflow':'hidden','margin-top':Messagecount>0?'60px':'0','height':Messagecount>0?calc('100vh-60px'):'100vh',}">
<view v-if="g.length > 0" :style="{'width':'100vw','overflow':'hidden','margin-top':Messagecount>0?'60px':'0','height':Messagecount>0?'calc(100vh-60px)':'100vh',}">
<scroll-view :scroll-y="true" :enable-back-to-top="true" :enable-flex="true" @scroll='inputscroll' @scrolltolower="lower"
:style="{ height: '100%' }">
<view class="ftBox" v-for="(x, i) in g" :key="i">
......@@ -264,9 +266,14 @@
</view>
<view class="imgmode" v-if="x.fileType==2">
<view style="width: 100px;height:120px;margin-bottom: 6px;position: relative;">
<video id="myVideo" :src="x.files[0]" style="width: 100%;height: 100%;" :controls='false' :show-center-play-btn='false'></video>
<video :id="'myVideo'+i" :src="x.files[0]" style="width: 100%;height: 100%;"
:controls='controls'
:show-center-play-btn='false'
:show-fullscreen-btn='false'
@fullscreenchange='videoControl'
></video>
<view style="width: 100%;height: 100%;position: absolute;left: 0;top: 0;display: flex;align-items: center;justify-content: center;"
@click="enlarge(x.files[0])">
@click="enlarge(x.files[0],i)">
<u-icon name="play-circle-o" :size="50" color="#FFF"></u-icon>
</view>
</view>
......@@ -406,7 +413,8 @@
show:false,
user:'',//点击用户保存的数据
Messagecount:0,
playindex:0,
playindex:0,
controls:false,//显示默认控件
}
},
created() {
......@@ -451,6 +459,9 @@
this.getDMCount();
}
},
onUnload(){
innerAudioContext.stop();
},
methods: {
init() {
......@@ -490,14 +501,7 @@
}
);
},
enlarge(file) {
// 全屏
innerAudioContext.stop();
uni.navigateTo({
url: '/pages/friendcircle/enlargevideo?file=' + file
})
},
//语音播放
playVoice(x,i) {
let that = this
......@@ -696,12 +700,7 @@
current: index,
});
},
enlarge(file) {
innerAudioContext.stop();
uni.navigateTo({
url: '/pages/friendcircle/enlargevideo?file=' + file
})
},
paste(){//复制
uni.setClipboardData({
data: this.user.item.content,
......@@ -713,6 +712,27 @@
url: '/pages/friendcircle/medynamic'
})
},
enlarge(file,i) {
// 全屏
innerAudioContext.stop();
this.videoContext = uni.createVideoContext('myVideo'+i);
this.videoContext.requestFullScreen({
direction:0
})
// uni.navigateTo({
// url: '/pages/friendcircle/enlargevideo?file=' + file
// })
},
videoControl(e){
if(e.detail.fullScreen==false){
this.videoContext.stop()
this.controls=false
}else{
this.videoContext.play()
this.controls=true
}
}
}
}
......
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