diff --git a/pages/index/index.vue b/pages/index/index.vue index 12c0ad1..5d3133b 100644 --- a/pages/index/index.vue +++ b/pages/index/index.vue @@ -219,7 +219,7 @@ - + @@ -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 diff --git a/pages/msg/im.vue b/pages/msg/im.vue index 0580961..c0a76f3 100644 --- a/pages/msg/im.vue +++ b/pages/msg/im.vue @@ -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: { diff --git a/pages/videoCircle/index.vue b/pages/videoCircle/index.vue index 267f61b..e074187 100644 --- a/pages/videoCircle/index.vue +++ b/pages/videoCircle/index.vue @@ -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: {