diff --git a/pages/VideoPlayBackList/VideoPlayBackDetail.vue b/pages/VideoPlayBackList/VideoPlayBackDetail.vue index 841dd20..87bcdf0 100644 --- a/pages/VideoPlayBackList/VideoPlayBackDetail.vue +++ b/pages/VideoPlayBackList/VideoPlayBackDetail.vue @@ -18,12 +18,16 @@ export default { pageKeyId: '' } }, - onReady: function(res) { + onReady(res) { this.videoContext = uni.createVideoContext('myVideo'); this.videoContext.requestFullScreen(); }, - onLoad:function(e){ - this.curPlayVideoUrl = e.videoUrl + onLoad(options) { + if (!options.click) { + uni.switchTab({ url: '/pages/home/index' }) + return + } + this.curPlayVideoUrl = options.videoUrl const id = options.id this.pageKeyId = `findVideo_videoId_${id}` }, diff --git a/pages/VideoPlayBackList/VideoPlayBackList.vue b/pages/VideoPlayBackList/VideoPlayBackList.vue index 276a1d6..b006734 100644 --- a/pages/VideoPlayBackList/VideoPlayBackList.vue +++ b/pages/VideoPlayBackList/VideoPlayBackList.vue @@ -51,7 +51,11 @@ export default { pageKeyId: Object.freeze('findVideoList') } }, - onLoad() { + onLoad(options) { + if (!options.click) { + uni.switchTab({ url: '/pages/home/index' }) + return + } this.getType() this.fetchList() }, @@ -94,7 +98,7 @@ export default { }) }, goDetail(item) { - this.$yrouter.push("/pages/VideoPlayBackList/VideoPlayBackDetail?videoUrl=" + item.video + '&id=' + item.id) + this.$yrouter.push("/pages/VideoPlayBackList/VideoPlayBackDetail?videoUrl=" + item.video + '&id=' + item.id + '&click=1') } } } diff --git a/pages/home/index.vue b/pages/home/index.vue index 88ae91d..2241fab 100644 --- a/pages/home/index.vue +++ b/pages/home/index.vue @@ -183,7 +183,7 @@ --> - + @@ -191,7 +191,7 @@ - + 点击进入 @@ -1295,7 +1295,7 @@ export default { pause() { }, toKD() { - this.$yrouter.push('/pages/VideoPlayBackList/VideoPlayBackList') + this.$yrouter.push('/pages/VideoPlayBackList/VideoPlayBackList?click=1') }, toNewZone() { this.$yrouter.push('/pages/home/newZone')