From 4c110d0a76490f86fb8ed6f41679dd3df9ecd993 Mon Sep 17 00:00:00 2001 From: Fox-33 <1466778434@qq.com> Date: Thu, 24 Apr 2025 20:42:10 +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/auth/wxLogin.vue | 11 +++-------- pages_order/sharing/article.vue | 4 +--- pages_order/sharing/group.vue | 19 +++++++------------ pages_order/sharing/personal.vue | 16 +++++++--------- pages_order/sharing/video.vue | 7 ++++--- 5 files changed, 22 insertions(+), 35 deletions(-) diff --git a/pages_order/auth/wxLogin.vue b/pages_order/auth/wxLogin.vue index 3dc2e1d..6769d47 100644 --- a/pages_order/auth/wxLogin.vue +++ b/pages_order/auth/wxLogin.vue @@ -93,14 +93,9 @@ } }, onCancel() { - uni.navigateBack({ - delta: 1, - fail: () => { - uni.reLaunch({ - url: '/pages/index/index' - }) - } - }); + uni.reLaunch({ + url: '/pages/index/index' + }) }, } } diff --git a/pages_order/sharing/article.vue b/pages_order/sharing/article.vue index b77ce4b..2609d62 100644 --- a/pages_order/sharing/article.vue +++ b/pages_order/sharing/article.vue @@ -55,7 +55,7 @@ }, onShow() { if (this.id && uni.getStorageSync('token')) { - this.initData() + this.detail.id ? this.refreshLockStatus() : this.initData() } }, async onLoad(option) { @@ -103,8 +103,6 @@ } this.$fetch('addLogShareInfo', params) - this.refreshLockStatus() - return o }, methods: { diff --git a/pages_order/sharing/group.vue b/pages_order/sharing/group.vue index 7d9f315..85045b7 100644 --- a/pages_order/sharing/group.vue +++ b/pages_order/sharing/group.vue @@ -48,7 +48,7 @@ }, onShow() { if (this.id && uni.getStorageSync('token')) { - this.fetchDetails() + this.detail.id ? this.refreshLockStatus() : this.fetchDetails() } }, onLoad(option) { @@ -88,17 +88,12 @@ query: `id=${this.id}&state=2&shareId=${this.userInfo.id}`, } - //调用增加分享次数的方法 - const params = { - id:this.id, - state:"2", - } - this.$fetch('addLogShareInfo', params) - - - - - this.refreshLockStatus() + //调用增加分享次数的方法 + const params = { + id:this.id, + state:"2", + } + this.$fetch('addLogShareInfo', params) return o }, diff --git a/pages_order/sharing/personal.vue b/pages_order/sharing/personal.vue index deafe4b..2c6b37f 100644 --- a/pages_order/sharing/personal.vue +++ b/pages_order/sharing/personal.vue @@ -49,7 +49,7 @@ }, onShow() { if (this.id && uni.getStorageSync('token')) { - this.fetchDetails() + this.detail.id ? this.refreshLockStatus() : this.fetchDetails() } }, onLoad(option) { @@ -89,14 +89,12 @@ query: `id=${this.id}&state=0&shareId=${this.userInfo.id}`, } - - //调用增加分享次数的方法 - const params = { - id:this.id, - state:"0", - } - this.$fetch('addLogShareInfo', params) - this.refreshLockStatus() + //调用增加分享次数的方法 + const params = { + id:this.id, + state:"0", + } + this.$fetch('addLogShareInfo', params) return o }, diff --git a/pages_order/sharing/video.vue b/pages_order/sharing/video.vue index 05c1ad3..fe105fa 100644 --- a/pages_order/sharing/video.vue +++ b/pages_order/sharing/video.vue @@ -62,7 +62,7 @@ }, onShow() { if (this.id && uni.getStorageSync('token')) { - this.initData() + this.detail.id ? this.refreshLockStatus() : this.initData() } }, async onLoad(option) { @@ -110,8 +110,6 @@ } this.$fetch('addLogShareInfo', params) - this.refreshLockStatus() - return o }, methods: { @@ -126,6 +124,8 @@ this.fetchCheckShare().then(result => { const { open } = result + console.log('--open', open) + this.isLocked = !open }) await this.fetchDetails(this.id) @@ -175,6 +175,7 @@ this.isLocked = false this.timeIsUp = false this.videoContext.play() + console.log('--play') } else { this.videoContext.pause() this.timeIsUp = true