From c0dca9f1330fa16fc958441efd10a86a98da58a9 Mon Sep 17 00:00:00 2001 From: feige996 <1020102647@qq.com> Date: Thu, 21 Aug 2025 14:37:24 +0800 Subject: [PATCH] =?UTF-8?q?fix(login):=20=E4=BF=AE=E5=A4=8D=E9=87=8D?= =?UTF-8?q?=E5=AE=9A=E5=90=91URL=E6=9C=AA=E6=AD=A3=E7=A1=AE=E5=A4=84?= =?UTF-8?q?=E7=90=86=E7=A9=BA=E5=80=BC=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 当options.redirect为空时,直接使用tabbarList[0].pagePath作为默认值,避免潜在的类型错误 --- src/pages/login/login.vue | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/pages/login/login.vue b/src/pages/login/login.vue index 5ee006a..0601da1 100644 --- a/src/pages/login/login.vue +++ b/src/pages/login/login.vue @@ -16,7 +16,12 @@ import { ensureDecodeURIComponent } from '@/utils' const redirectUrl = ref('') onLoad((options) => { console.log('login options', options) - redirectUrl.value = ensureDecodeURIComponent(options.redirect) || tabbarList[0].pagePath + if (options.redirect) { + redirectUrl.value = ensureDecodeURIComponent(options.redirect) + } + else { + redirectUrl.value = tabbarList[0].pagePath + } }) const userStore = useUserStore() function doLogin() {