fix(login): 修复重定向URL未正确处理空值的问题
当options.redirect为空时,直接使用tabbarList[0].pagePath作为默认值,避免潜在的类型错误
This commit is contained in:
@@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user