falcon-jin
2 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with
4 additions and
4 deletions
-
apps/web-ele/src/router/guard.ts
-
apps/web-naive/src/router/guard.ts
|
|
|
@ -115,10 +115,10 @@ function setupAccessGuard(router: Router) { |
|
|
|
// 保存菜单信息和路由信息
|
|
|
|
accessStore.setAccessMenus(accessibleMenus); |
|
|
|
accessStore.setAccessRoutes(accessibleRoutes); |
|
|
|
const redirectPath = (from.query.redirect ?? to.path) as string; |
|
|
|
const redirectPath = (from.query.redirect ?? to.fullPath) as string; |
|
|
|
|
|
|
|
return { |
|
|
|
path: decodeURIComponent(redirectPath), |
|
|
|
...router.resolve(decodeURIComponent(redirectPath)), |
|
|
|
replace: true, |
|
|
|
}; |
|
|
|
}); |
|
|
|
|
|
|
|
@ -115,10 +115,10 @@ function setupAccessGuard(router: Router) { |
|
|
|
// 保存菜单信息和路由信息
|
|
|
|
accessStore.setAccessMenus(accessibleMenus); |
|
|
|
accessStore.setAccessRoutes(accessibleRoutes); |
|
|
|
const redirectPath = (from.query.redirect ?? to.path) as string; |
|
|
|
const redirectPath = (from.query.redirect ?? to.fullPath) as string; |
|
|
|
|
|
|
|
return { |
|
|
|
path: decodeURIComponent(redirectPath), |
|
|
|
...router.resolve(decodeURIComponent(redirectPath)), |
|
|
|
replace: true, |
|
|
|
}; |
|
|
|
}); |
|
|
|
|