diff --git a/pages/videoCircle/index.vue b/pages/videoCircle/index.vue index 5449802..f072d47 100644 --- a/pages/videoCircle/index.vue +++ b/pages/videoCircle/index.vue @@ -198,11 +198,8 @@ watch:{ async k(k,old_k){ - // console.log(k, old_k) + console.log(k, old_k) this.progressBarPercent = 0; - // #ifndef MP - this.clearToTime(); - // #endif this.isShow = false this.dataList[old_k].playIng = false//如果视频暂停,就加载封面 this.dataList[old_k].isplay = true @@ -284,6 +281,7 @@ this.boxStyle.width = this.windowWidth + 'px'//给宽度加px this.boxStyle.height = this.windowHeight - this.deleteHeight;//有 tabbar的 修改这里可以改变视频高度 this.get() //刚进入页面加载数据 + // #ifndef MP this.rotateX(); // #endif @@ -292,31 +290,20 @@ onShow(){ console.log('回到前台'); if(this.dataList.length !== 0){ - // #ifdef MP - this.dataList[this.k].state = 'play'; - uni.createVideoContext(this.dataList[this.k].id+''+this.k,this).play() - // #endif - // #ifdef H5 if(this.isClick){ + console.log(222) this.dataList[this.k].state = 'play'; uni.createVideoContext(this.dataList[this.k].id+''+this.k,this).play() audo.play() } - // #endif } }, onHide(){ - // #ifdef MP - this.dataList[this.k].state = 'pause'; - uni.createVideoContext(this.dataList[this.k].id+''+this.k,this).pause() - // #endif - // #ifdef H5 if(this.isClick){ this.dataList[this.k].state = 'pause'; uni.createVideoContext(this.dataList[this.k].id+''+this.k,this).pause() audo.pause() } - // #endif console.log('到后台'); }, @@ -749,10 +736,13 @@ this.dataList[this.k].isplay = true this.dataList[this.k].playIng = true setTimeout(()=>{ - uni.createVideoContext(this.dataList[this.k].id+''+this.k,this).seek(0) - uni.createVideoContext(this.dataList[this.k].id+''+this.k,this).pause() - this.dataList[this.k].state = 'pause'; + // uni.createVideoContext(this.dataList[this.k].id+''+this.k,this).seek(0) + // uni.createVideoContext(this.dataList[this.k].id+''+this.k,this).pause() + this.dataList[this.k].state = 'play'; + uni.createVideoContext(this.dataList[this.k].id+''+this.k,this).play() audo.src = this.dataList[this.k].src; + audo.play() + // this.dataList[this.k].state = 'pause'; },500) },200)