修复了无限循环问题
This commit is contained in:
parent
e0605a617d
commit
1a87cf4ea7
@ -201,7 +201,12 @@ class RouteGuard {
|
|||||||
if (!userId) {
|
if (!userId) {
|
||||||
console.debug('❌ No user ID, redirecting to apply')
|
console.debug('❌ No user ID, redirecting to apply')
|
||||||
console.groupEnd()
|
console.groupEnd()
|
||||||
next(PAGES.APPLY)
|
// 防止无限循环:如果已经在申请页面,就不再重定向
|
||||||
|
if (to.path === PAGES.APPLY) {
|
||||||
|
next()
|
||||||
|
} else {
|
||||||
|
next(PAGES.APPLY)
|
||||||
|
}
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -238,7 +243,8 @@ class RouteGuard {
|
|||||||
*/
|
*/
|
||||||
isPublicPage(path) {
|
isPublicPage(path) {
|
||||||
const publicPages = [
|
const publicPages = [
|
||||||
PAGES.NOT_APP,
|
PAGES.APPLY, // 申请页面 - 任何人都可以访问
|
||||||
|
PAGES.NOT_APP, // 错误页面
|
||||||
'/404',
|
'/404',
|
||||||
'/error'
|
'/error'
|
||||||
]
|
]
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user