| | |
| | | const res = await baseModuleServices.getCurrentUserModuleList({ |
| | | showLoading: false, |
| | | }); |
| | | const accessedRoutes = ascending(addAsyncRoutes(formatModuleList([], null))); // createAccessedRoutes(userMenuList, userInfo) |
| | | const accessedRoutes = ascending(addAsyncRoutes(formatModuleList(res, null))); // createAccessedRoutes(userMenuList, userInfo) |
| | | //@ts-ignore |
| | | accessedRoutes.push({ path: '/:pathMatch(.*)*', redirect: '/404', hidden: true }); |
| | | |
| | | this.addRoutes = accessedRoutes; |
| | | this.routes = constantRoutes.concat(accessedRoutes); |
| | | this.routes = constantRoutes |
| | | .concat(accessedRoutes) |
| | | .sort((a, b) => (a.meta?.rank ?? 0) - (b.meta?.rank ?? 0)); |
| | | |
| | | resolve(accessedRoutes); |
| | | } catch (e) { |