From ed9ae77ead2b3b4a4e3790624c4d07f517b6cef2 Mon Sep 17 00:00:00 2001 From: lifizer <913626195@qq.com> Date: Thu, 6 Mar 2025 09:49:24 +0800 Subject: [PATCH] =?UTF-8?q?Feat(=E5=AF=BB=E7=9C=8B=E7=82=B9):=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0=E9=80=BB=E8=BE=91=E5=88=A4=E6=96=AD=EF=BC=8C=E5=A6=82?= =?UTF-8?q?=E6=9E=9C=E4=B8=8D=E6=98=AF=E7=82=B9=E5=87=BB=E8=BF=9B=E5=85=A5?= =?UTF-8?q?=E5=88=99=E5=BC=BA=E5=88=B6=E8=B7=B3=E8=BD=AC=E8=87=B3=E9=A6=96?= =?UTF-8?q?=E9=A1=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/VideoPlayBackList/VideoPlayBackDetail.vue | 10 +++++++--- pages/VideoPlayBackList/VideoPlayBackList.vue | 8 ++++++-- pages/home/index.vue | 6 +++--- 3 files changed, 16 insertions(+), 8 deletions(-) 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')