From 23d5726ed113eeb4cb7862882120b4806424168c Mon Sep 17 00:00:00 2001 From: LinCyJang Date: Mon, 23 Mar 2026 22:30:46 +0800 Subject: [PATCH] =?UTF-8?q?Fix=EF=BC=9A4960=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=E4=BD=93=E9=AA=8C=E5=BA=97?= =?UTF-8?q?=E9=A1=B6=E9=83=A8=E5=9B=BE=E7=89=87=E6=95=B0=E6=8D=AE=E8=8E=B7?= =?UTF-8?q?=E5=8F=96=E9=94=99=E8=AF=AF=EF=BC=8C=E5=BD=93=E5=89=8D=E6=98=BE?= =?UTF-8?q?=E7=A4=BA=E7=9A=84=E6=98=AF=E5=90=8E=E5=8F=B0=E9=85=8D=E7=BD=AE?= =?UTF-8?q?=E7=9A=84=E4=BD=93=E9=AA=8C=E9=A1=B9=E7=9B=AE-=E4=B8=BB?= =?UTF-8?q?=E9=A2=98=E5=9B=BE=E7=89=87=E6=95=B0=E6=8D=AE=EF=BC=8C=E5=BA=94?= =?UTF-8?q?=E8=8E=B7=E5=8F=96=E4=BD=93=E9=AA=8C=E5=BA=97=E9=85=8D=E7=BD=AE?= =?UTF-8?q?=E7=9A=84=E8=A7=86=E9=A2=91+=E8=BD=AE=E6=92=AD=E5=9B=BE?= =?UTF-8?q?=E6=95=B0=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pkg_product/views/experienceProjectDetail.vue | 39 ++++++++++++++++++- 1 file changed, 37 insertions(+), 2 deletions(-) diff --git a/pkg_product/views/experienceProjectDetail.vue b/pkg_product/views/experienceProjectDetail.vue index f5970f3..54c8f8f 100644 --- a/pkg_product/views/experienceProjectDetail.vue +++ b/pkg_product/views/experienceProjectDetail.vue @@ -10,8 +10,16 @@ /> + + + + + + + + item) } }, onLoad(query) { @@ -177,6 +195,8 @@ export default { this.project.id = id this.project.name = decode(query.name) this.project.cover = decode(query.cover) + this.project.video = decode(query.video) + this.project.banner = decode(query.banner) this.project.intro = decode(query.intro) this.project.serviceTime = query.serviceTime || '' this.project.serviceEndTime = query.serviceEndTime || '' @@ -204,7 +224,20 @@ export default { } this.fetchProjectDetail() }, + onReady() { + this.videoContext = uni.createVideoContext('hero-video', this) + }, methods: { + handleSwiperChange(e) { + this.currentSwiperIndex = e.detail.current + if (this.project.video && this.videoContext) { + if (this.currentSwiperIndex === 0) { + this.videoContext.play() + } else { + this.videoContext.pause() + } + } + }, fetchProjectDetail() { if (!this.experienceMerchantId) { return @@ -218,6 +251,8 @@ export default { const data = res.data || {} this.project.name = data.name || this.project.name this.project.cover = data.cover || this.project.cover + this.project.video = data.video || this.project.video + this.project.banner = data.banner || this.project.banner this.project.intro = data.intro || this.project.intro this.project.serviceTime = data.serviceTime || this.project.serviceTime this.project.serviceEndTime = data.serviceEndTime || this.project.serviceEndTime