From 78c83ecaa311c8f1b1d772e36770a7b412072627 Mon Sep 17 00:00:00 2001 From: modendeveloper Date: Thu, 19 Dec 2024 23:59:15 +0800 Subject: [PATCH] =?UTF-8?q?Fix=EF=BC=9A2903=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=86=9C=E6=B0=91=E5=BA=97?= =?UTF-8?q?=E9=93=BA=E3=80=81=E6=9D=91=E5=B1=8B=E7=A7=9F=E5=94=AE=EF=BC=8C?= =?UTF-8?q?=E5=AF=BB=E8=B6=A3=E5=91=B3=E5=BA=97=E9=93=BA=EF=BC=8C=E8=A7=86?= =?UTF-8?q?=E9=A2=91=E8=B5=84=E8=AE=AF=E6=92=AD=E6=94=BE=E4=B8=AD=E5=86=8D?= =?UTF-8?q?=E7=82=B9=E5=87=BB=E8=A7=86=E9=A2=91=E5=B0=81=E9=9D=A2=E6=92=AD?= =?UTF-8?q?=E6=94=BE=EF=BC=8C=E4=B8=A4=E8=80=85=E4=BC=9A=E5=87=BA=E7=8E=B0?= =?UTF-8?q?=E5=90=8C=E6=97=B6=E6=92=AD=E6=94=BE=E6=83=85=E5=86=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/town/components/information.vue | 6 ++++++ pagesInn/inn/farmerStore.vue | 7 +++++++ pagesInn/inn/innHome.vue | 7 +++++++ pkg_product/views/famousQianxianShop.vue | 7 +++++++ pkg_product/views/famousQianxianVillageShop.vue | 7 +++++++ 5 files changed, 34 insertions(+) diff --git a/pages/town/components/information.vue b/pages/town/components/information.vue index 0a8ac02..5b6bc95 100644 --- a/pages/town/components/information.vue +++ b/pages/town/components/information.vue @@ -102,6 +102,12 @@ export default { } }, methods: { + coverPlay(){ + 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/pagesInn/inn/farmerStore.vue b/pagesInn/inn/farmerStore.vue index b2366e1..c7457ff 100644 --- a/pagesInn/inn/farmerStore.vue +++ b/pagesInn/inn/farmerStore.vue @@ -34,6 +34,7 @@ play-btn-position="center" id="coverVideo" class="video" + @play="coverPlay" /> @@ -443,6 +444,12 @@ export default { } }) }, + coverPlay(){ + this.videoPlayers.forEach(player => { + const playerCtx = uni.createVideoContext(player, this) + playerCtx.pause() + }) + }, infoItemViewClick(item, index) { if(item.type === 2) { const coverCtx = uni.createVideoContext('coverVideo', this) diff --git a/pagesInn/inn/innHome.vue b/pagesInn/inn/innHome.vue index b6dace8..c2805f9 100644 --- a/pagesInn/inn/innHome.vue +++ b/pagesInn/inn/innHome.vue @@ -35,6 +35,7 @@ object-fit="contain" play-btn-position="center" class="video" + @play="coverPlay" /> @@ -668,6 +669,12 @@ export default { infoClick: function (info) { // this.$yrouter.push('/pagesInn/inn/innInfoDetail?id=' + info.id) }, + coverPlay(){ + this.videoPlayers.forEach(player => { + const playerCtx = uni.createVideoContext(player, this) + playerCtx.pause() + }) + }, infoItemViewClick(item, index) { if(item.type === 'NT_VIDEO') { const coverCtx = uni.createVideoContext('coverVideo', this) diff --git a/pkg_product/views/famousQianxianShop.vue b/pkg_product/views/famousQianxianShop.vue index b488cde..0004bdf 100644 --- a/pkg_product/views/famousQianxianShop.vue +++ b/pkg_product/views/famousQianxianShop.vue @@ -34,6 +34,7 @@ play-btn-position="center" class="video" id="coverVideo" + @play="coverPlay" /> @@ -1064,6 +1065,12 @@ export default { infoClick(info) { // this.$yrouter.push('/pagesInn/inn/innInfoDetail?id=' + info.id) }, + coverPlay(){ + this.videoPlayers.forEach(player => { + const playerCtx = uni.createVideoContext(player, this) + playerCtx.pause() + }) + }, infoItemViewClick(item, index) { if(item.type === 2) { const coverCtx = uni.createVideoContext('coverVideo', this) diff --git a/pkg_product/views/famousQianxianVillageShop.vue b/pkg_product/views/famousQianxianVillageShop.vue index 56a11ad..eb6043d 100644 --- a/pkg_product/views/famousQianxianVillageShop.vue +++ b/pkg_product/views/famousQianxianVillageShop.vue @@ -34,6 +34,7 @@ play-btn-position="center" class="video" id="coverVideo" + @play="coverPlay" /> @@ -256,6 +257,12 @@ export default { this.getInfoReq() }, methods: { + coverPlay(){ + this.videoPlayers.forEach(player => { + const playerCtx = uni.createVideoContext(player, this) + playerCtx.pause() + }) + }, handleVideo(item, index) { if(item.type === 2) { const coverCtx = uni.createVideoContext('coverVideo', this)