From 585b0a203f1633aaa8486c74f75be805698f23cc Mon Sep 17 00:00:00 2001 From: root Date: Tue, 10 Mar 2026 20:36:20 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E5=88=86=E4=BA=AB?= =?UTF-8?q?=E9=A1=B5=E4=BE=9D=E8=B5=96=E5=88=86=E6=9E=90=E5=BF=BD=E7=95=A5?= =?UTF-8?q?=E5=B9=B6=E5=A2=9E=E5=8A=A0=E6=9C=AC=E5=9C=B0=E9=A2=84=E8=A7=88?= =?UTF-8?q?=E5=85=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/profile/index.vue | 25 ++++++++++++++++++++++--- 1 file changed, 22 insertions(+), 3 deletions(-) diff --git a/pages/profile/index.vue b/pages/profile/index.vue index 6967916..e523394 100644 --- a/pages/profile/index.vue +++ b/pages/profile/index.vue @@ -18,6 +18,15 @@ + + 👁️ + + 预览分享页 + 本地查看分享落地页是否可访问 + + + + 🔄 @@ -80,7 +89,7 @@ const shareExpireAt = ref('') const shareLoading = ref(false) const userName = computed(() => userStore.user?.nickname || '戒烟用户') -const userAvatar = computed(() => userStore.user?.avatar_url || '/static/images/default-avatar.png') +const userAvatar = computed(() => userStore.user?.avatar_url || '/static/icons/profile.png') const shareDesc = computed(() => { if (!shareToken.value) { @@ -91,9 +100,9 @@ const shareDesc = computed(() => { const sharePath = computed(() => { if (!shareToken.value) { - return '/pages/index/index' + return 'pages/index/index' } - return `/pages/share/index?share_token=${shareToken.value}` + return `pages/share/index?share_token=${shareToken.value}` }) function formatExpire(value) { @@ -128,6 +137,16 @@ async function prepareShareToken(showToast = false) { } } +function previewSharePage() { + if (!shareToken.value) { + uni.showToast({ title: '分享令牌尚未生成', icon: 'none' }) + return + } + uni.navigateTo({ + url: `/pages/share/index?share_token=${shareToken.value}` + }) +} + function goOnboarding() { uni.navigateTo({ url: '/pages/onboarding/index' }) }