fix(login): 修复重定向URL未正确处理空值的问题

当options.redirect为空时,直接使用tabbarList[0].pagePath作为默认值,避免潜在的类型错误
This commit is contained in:
feige996
2025-08-21 14:37:24 +08:00
parent 4a6864814a
commit c0dca9f133

View File

@@ -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() {