Merge branch 'zhangtao' of zhangtao/restructure into develop

This commit is contained in:
zhangtao 2022-06-01 09:59:41 +08:00
commit 40d50ccf36
1 changed files with 3 additions and 1 deletions

View File

@ -20,7 +20,9 @@ export function createPermissionGuard(router) {
try {
// await userStore.getUserInfo()
const routes = await permissionStore.generateRoutes()
router.addRoute(routes[0])
routes.forEach((item) => {
router.addRoute(item)
})
router.addRoute(NOT_FOUND_ROUTE)
router.addRoute(REDIRECT_ROUTE)
next({ ...to, replace: true })