fix: 修复redirect跳转的bug
This commit is contained in:
@@ -88,6 +88,11 @@ export const useUserStore = defineStore('user', () => {
|
||||
router.addRoute(asyncRouter)
|
||||
})
|
||||
|
||||
if(router.currentRoute.value.query.redirect) {
|
||||
await router.replace(router.currentRoute.value.query.redirect)
|
||||
return true
|
||||
}
|
||||
|
||||
if (!router.hasRoute(userInfo.value.authority.defaultRouter)) {
|
||||
ElMessage.error('请联系管理员进行授权')
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user