Browse Source

Merge branch 'zhangtao' of zhangtao/restructure into develop

develop
zhangtao 2 years ago
parent
commit
40d50ccf36
1 changed files with 3 additions and 1 deletions
  1. +3
    -1
      src/router/guard/permission-guard.js

+ 3
- 1
src/router/guard/permission-guard.js 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 })

Loading…
Cancel
Save