From 020bdadcaef85ccd3f0b14d8fdf7111ba57c07a7 Mon Sep 17 00:00:00 2001 From: modendeveloper Date: Thu, 19 Dec 2024 00:26:18 +0800 Subject: [PATCH] =?UTF-8?q?Fix=EF=BC=9A2876=20=E3=80=90=E7=AE=A1=E7=90=86?= =?UTF-8?q?=E5=90=8E=E5=8F=B0=E3=80=91=E5=9C=B0=E6=A0=87=E5=A5=BD=E7=89=A9?= =?UTF-8?q?=E8=B5=84=E8=AE=AF=E5=A2=9E=E5=8A=A0=E4=B8=8A=E4=BC=A0=E8=A7=86?= =?UTF-8?q?=E9=A2=91=E5=8A=9F=E8=83=BD=EF=BC=8C=E5=89=8D=E7=AB=AF=E5=9C=B0?= =?UTF-8?q?=E6=A0=87=E5=A5=BD=E7=89=A9=E8=B5=84=E8=AE=AF=E4=B9=9F=E9=9C=80?= =?UTF-8?q?=E8=A6=81=E8=B0=83=E6=95=B4=E4=B8=BA=E5=8F=AF=E4=BB=A5=E6=98=BE?= =?UTF-8?q?=E7=A4=BA=E8=A7=86=E9=A2=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/home/components/information.vue | 40 ++++++++++++++++++++++++++- pages/town/components/information.vue | 2 +- 2 files changed, 40 insertions(+), 2 deletions(-) diff --git a/pages/home/components/information.vue b/pages/home/components/information.vue index c047ce4..0579b5d 100644 --- a/pages/home/components/information.vue +++ b/pages/home/components/information.vue @@ -20,13 +20,25 @@ + + @@ -101,7 +113,8 @@ export default { data() { return { webUrl: this.$VUE_APP_RESOURCES_URL, - infoArray: [] + infoArray: [], + videoPlayers:[] } }, watch: { @@ -138,6 +151,26 @@ export default { }) }, infoItemViewClick(item) { + if(item.type === 2) { + // const coverCtx = uni.createVideoContext('coverVideo', this) + // coverCtx.pause() + const playerId = 'video-item' + index + if(this.videoPlayers.includes(playerId)) { + this.videoPlayers.forEach(player => { + if(player === playerId) return + const playerCtx = uni.createVideoContext(player, this) + playerCtx.pause() + }) + } { + this.videoPlayers.push(playerId) + this.videoPlayers.forEach(player => { + if(player === playerId) return + const playerCtx = uni.createVideoContext(player, this) + playerCtx.pause() + }) + } + this.$emit('video') + } uni.$u.debounce(() => { hadView({ landmarkNewsId: item.id }).finally(() => { this.infoArray.map(info => { @@ -152,6 +185,11 @@ export default { };