This commit is contained in:
parent
a764d8d74a
commit
a4e032b526
|
@ -219,7 +219,7 @@
|
|||
<view class="swiper-topic-list" v-for="(item,index) in swiperDateLists" :key="index">
|
||||
<view class="swiper-item-card" style="position: relative;">
|
||||
<view class="data-list">
|
||||
<view class="videoHovers" @click="towxh5Video(item)">
|
||||
<view class="videoHovers" @click="towxh5Video(item,index)">
|
||||
<image class="playState" src="@/static/bofang.png"></image>
|
||||
</view>
|
||||
<image :src="item.picPath" mode="aspectFill" style="width: 100%; height: 100%;"></image>
|
||||
|
@ -309,6 +309,8 @@
|
|||
// #ifdef APP-PLUS
|
||||
// import permision from "@/components/permission.js";
|
||||
// #endif
|
||||
let audo = uni.createInnerAudioContext()
|
||||
audo.loop = true
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
|
@ -584,11 +586,16 @@
|
|||
videoContext.src = this.filePath; // 设置视频源
|
||||
videoContext.play(); // 播放视频
|
||||
},
|
||||
towxh5Video(item){
|
||||
towxh5Video(item,index){
|
||||
this.playShow=true;
|
||||
this.filePath=item.filePath;
|
||||
this.contentVideo=item.content;
|
||||
this.videoId=item.id
|
||||
this.videoId=item.id;
|
||||
const videoContext = uni.createVideoContext('myVideo', this);
|
||||
videoContext.src = this.filePath; // 设置视频源
|
||||
setTimeout(()=>{
|
||||
videoContext.play(); // 播放视频
|
||||
},100)
|
||||
this.$refs.pinglun.open("center")
|
||||
},
|
||||
swichMenu(index,id) {//视频导航
|
||||
|
@ -600,13 +607,6 @@
|
|||
}).exec();
|
||||
this.parType=index+1;
|
||||
this.getVideo()
|
||||
// this.currentTab = index
|
||||
// console.log(11,index)
|
||||
|
||||
// this.scrollLeft = 0;
|
||||
// for (let i = 0; i < index; i++) {
|
||||
// this.scrollLeft += 60
|
||||
// };
|
||||
},
|
||||
swiperChange(e) {//视频导航
|
||||
let index = e.detail.current
|
||||
|
|
|
@ -144,9 +144,9 @@
|
|||
},
|
||||
onLoad(d) {
|
||||
this.userId = this.$queue.getData('userId');
|
||||
let scoket = uni.getStorageSync('wbescokt')
|
||||
this.byUserId = scoket.byUserId
|
||||
this.chatConversationId = scoket.chatConversationId;
|
||||
// let scoket = uni.getStorageSync('wbescokt')
|
||||
this.byUserId = d.byUserId
|
||||
this.chatConversationId = d.chatConversationId;
|
||||
this.connect();
|
||||
},
|
||||
computed: {
|
||||
|
|
|
@ -265,7 +265,6 @@
|
|||
this.boxStyle.width = this.windowWidth + 'px'//给宽度加px
|
||||
this.boxStyle.height = this.windowHeight - this.deleteHeight;//有 tabbar的 修改这里可以改变视频高度
|
||||
this.get() //刚进入页面加载数据
|
||||
|
||||
},
|
||||
onShow(){
|
||||
console.log('回到前台');
|
||||
|
@ -273,18 +272,15 @@
|
|||
this.dataList[this.k].state = 'pause';
|
||||
uni.createVideoContext(this.dataList[this.k].id+''+this.k,this).pause()
|
||||
audo.pause()
|
||||
// this.dataList[this.k].state = 'play';
|
||||
// uni.createVideoContext(this.dataList[this.k].id+''+this.k,this).play()
|
||||
// audo.play()
|
||||
}
|
||||
},
|
||||
onHide(){
|
||||
console.log('到后台');
|
||||
if(this.isClick){
|
||||
this.dataList[this.k].state = 'pause';
|
||||
uni.createVideoContext(this.dataList[this.k].id+''+this.k,this).pause()
|
||||
audo.pause()
|
||||
}
|
||||
console.log('到后台');
|
||||
},
|
||||
|
||||
methods: {
|
||||
|
|
Loading…
Reference in New Issue