Browse Source

fix(登录页): 使用ensureDecodeURIComponent处理重定向URL

确保重定向URL被正确解码,避免特殊字符导致的问题
feige996 8 months ago
parent
commit
fc14810fcf
1 changed files with 2 additions and 1 deletions
  1. 2 1
      src/pages/login/login.vue

+ 2 - 1
src/pages/login/login.vue

@@ -11,11 +11,12 @@
 import { useUserStore } from '@/store/user'
 import { tabbarList } from '@/tabbar/config'
 import { isPageTabbar } from '@/tabbar/store'
+import { ensureDecodeURIComponent } from '@/utils'
 
 const redirectUrl = ref('')
 onLoad((options) => {
   console.log('login options', options)
-  redirectUrl.value = options.redirect || tabbarList[0].pagePath
+  redirectUrl.value = ensureDecodeURIComponent(options.redirect) || tabbarList[0].pagePath
 })
 const userStore = useUserStore()
 function doLogin() {