Commit 7b66b442 authored by Mac's avatar Mac

1

parent 604b2865
...@@ -132,6 +132,8 @@ ...@@ -132,6 +132,8 @@
width: 1; width: 1;
flex:1; flex:1;
margin-left: 10px; margin-left: 10px;
max-height: 300px;
overflow-y: auto;
} }
.friendcircle .comment{ .friendcircle .comment{
width: 100%; width: 100%;
...@@ -235,7 +237,7 @@ ...@@ -235,7 +237,7 @@
</view> </view>
</view> </view>
<u-empty v-if="g.length == 0" text="暂无动态" mode="list"></u-empty> <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" <scroll-view :scroll-y="true" :enable-back-to-top="true" :enable-flex="true" @scroll='inputscroll' @scrolltolower="lower"
:style="{ height: '100%' }"> :style="{ height: '100%' }">
<view class="ftBox" v-for="(x, i) in g" :key="i"> <view class="ftBox" v-for="(x, i) in g" :key="i">
...@@ -264,9 +266,14 @@ ...@@ -264,9 +266,14 @@
</view> </view>
<view class="imgmode" v-if="x.fileType==2"> <view class="imgmode" v-if="x.fileType==2">
<view style="width: 100px;height:120px;margin-bottom: 6px;position: relative;"> <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;" <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> <u-icon name="play-circle-o" :size="50" color="#FFF"></u-icon>
</view> </view>
</view> </view>
...@@ -407,6 +414,7 @@ ...@@ -407,6 +414,7 @@
user:'',//点击用户保存的数据 user:'',//点击用户保存的数据
Messagecount:0, Messagecount:0,
playindex:0, playindex:0,
controls:false,//显示默认控件
} }
}, },
created() { created() {
...@@ -452,6 +460,9 @@ ...@@ -452,6 +460,9 @@
} }
}, },
onUnload(){
innerAudioContext.stop();
},
methods: { methods: {
init() { init() {
this.loading = true; this.loading = true;
...@@ -490,14 +501,7 @@ ...@@ -490,14 +501,7 @@
} }
); );
}, },
enlarge(file) {
// 全屏
innerAudioContext.stop();
uni.navigateTo({
url: '/pages/friendcircle/enlargevideo?file=' + file
})
},
//语音播放 //语音播放
playVoice(x,i) { playVoice(x,i) {
let that = this let that = this
...@@ -696,12 +700,7 @@ ...@@ -696,12 +700,7 @@
current: index, current: index,
}); });
}, },
enlarge(file) {
innerAudioContext.stop();
uni.navigateTo({
url: '/pages/friendcircle/enlargevideo?file=' + file
})
},
paste(){//复制 paste(){//复制
uni.setClipboardData({ uni.setClipboardData({
data: this.user.item.content, data: this.user.item.content,
...@@ -713,6 +712,27 @@ ...@@ -713,6 +712,27 @@
url: '/pages/friendcircle/medynamic' 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