This commit is contained in:
Mr.jiang 2024-08-01 13:50:54 +08:00
parent a764d8d74a
commit a4e032b526
3 changed files with 14 additions and 18 deletions

View File

@ -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

View File

@ -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: {

View File

@ -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: {