@@ -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 }) |