We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a79df72 commit e9dd55fCopy full SHA for e9dd55f
web/src/permission.js
@@ -86,14 +86,13 @@ router.beforeEach(async (to, from) => {
86
87
// 白名单路由处理
88
if (WHITE_LIST.includes(to.name)) {
89
- if (
90
- token &&
91
- !routerStore.asyncRouterFlag &&
92
- !WHITE_LIST.includes(from.name)
93
- ) {
94
- await setupRouter(userStore)
+ if (token) {
+ if(!routerStore.asyncRouterFlag){
+ await setupRouter(userStore)
+ }
+ return { name: userStore.userInfo.authority.defaultRouter }
95
}
96
- return { name: userStore.userInfo.authority.defaultRouter }
+ return true
97
98
99
// 需要登录的路由处理
0 commit comments