From 380ed75ba4e982e249848966cf93b85eb45e5cc0 Mon Sep 17 00:00:00 2001 From: Fox-33 <1466778434@qq.com> Date: Thu, 24 Apr 2025 20:47:28 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E9=A1=B5=E9=9D=A2=E8=B0=83=E6=95=B4;?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages_order/sharing/video.vue | 57 +++++++------------------------------------ 1 file changed, 9 insertions(+), 48 deletions(-) diff --git a/pages_order/sharing/video.vue b/pages_order/sharing/video.vue index fe105fa..a1a922b 100644 --- a/pages_order/sharing/video.vue +++ b/pages_order/sharing/video.vue @@ -121,13 +121,7 @@ } }, async initData() { - this.fetchCheckShare().then(result => { - const { open } = result - - console.log('--open', open) - - this.isLocked = !open - }) + this.isLocked = true await this.fetchDetails(this.id) this.videoContext = uni.createVideoContext('video'); @@ -139,52 +133,19 @@ return {} } }, - async refreshLockStatus() { - - const result = await this.fetchCheckShare() - const { title, open } = result - - console.log('--open', open) - - this.$refs.popupUnlock.close(); - - if (open) { - this.isLocked = false - this.timeIsUp = false - this.videoContext.play() - return - } - - title && uni.showToast({ - title, - icon: 'none' - }) - + refreshLockStatus() { + this.isLocked = false + this.timeIsUp = false + this.videoContext.play() }, async onPlay() { if (!this.isLocked) { return } - - const result = await this.fetchCheckShare() - const { open, need_num, num } = result - - console.log('--open', open) - - if (open) { // 转发已达标 - this.isLocked = false - this.timeIsUp = false - this.videoContext.play() - console.log('--play') - } else { - this.videoContext.pause() - this.timeIsUp = true - uni.showToast({ - title: `还需转发${need_num - num}次`, - icon: 'none', - }) - this.$refs.popupUnlock.open(); - } + + this.videoContext.pause() + this.timeIsUp = true + this.$refs.popupUnlock.open(); }, async onTimeupdate(e) { const { currentTime } = e.target