From cc2664f116110e2b948e7b08ada5ed5615f707d8 Mon Sep 17 00:00:00 2001 From: linxi Date: Fri, 27 Dec 2024 17:06:24 +0800 Subject: [PATCH] =?UTF-8?q?Fix=EF=BC=9A2959=20=E3=80=90=E5=95=86=E5=9F=8E?= =?UTF-8?q?=E5=B0=8F=E7=A8=8B=E5=BA=8F=E3=80=91=E5=85=88=E6=92=AD=E6=94=BE?= =?UTF-8?q?=E5=8F=A4=E9=95=87=E6=B4=BB=E5=8A=A8=E7=89=88=E5=9D=97=E8=A7=86?= =?UTF-8?q?=E9=A2=91=EF=BC=8C=E5=86=8D=E6=92=AD=E6=94=BE=E4=B8=BB=E5=9B=BE?= =?UTF-8?q?=E8=A7=86=E9=A2=91=EF=BC=8C=E6=B4=BB=E5=8A=A8=E7=89=88=E5=9D=97?= =?UTF-8?q?=E8=A7=86=E9=A2=91=E4=B8=8D=E4=BC=9A=E6=9A=82=E5=81=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/town/components/information.vue | 6 ++++++ pages/town/index.vue | 6 +++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/pages/town/components/information.vue b/pages/town/components/information.vue index 81b16bf..392db92 100644 --- a/pages/town/components/information.vue +++ b/pages/town/components/information.vue @@ -108,6 +108,12 @@ export default { playerCtx.pause() }) }, + handlePlayer() { + this.videoPlayers.forEach(player => { + const playerCtx = uni.createVideoContext(player, this) + playerCtx.pause() + }) + }, infoItemViewClick(item, index) { if(item.contentType === 2) { // const coverCtx = uni.createVideoContext('coverVideo', this) diff --git a/pages/town/index.vue b/pages/town/index.vue index 34f75af..76d8e9d 100644 --- a/pages/town/index.vue +++ b/pages/town/index.vue @@ -11,6 +11,7 @@ autoplay play-btn-position="center" :show-fullscreen-btn="false" + @play="handlePlay" > @@ -39,7 +40,7 @@ - + @@ -114,6 +115,9 @@ export default { this.getActive() }, methods: { + handlePlay() { + this.$refs.information.handlePlayer() + }, handleVideo() { const videoCtx = uni.createVideoContext('videoCover', this) videoCtx.pause()