| | |
| | | const rdata = JSON.parse(JSON.stringify(res.data))
|
| | | const sidebarRoutes = filterAsyncRouter(sdata)
|
| | | const rewriteRoutes = filterAsyncRouter(rdata, false, true)
|
| | | const asyncRoutes = filterDynamicRoutes(dynamicRoutes);
|
| | | const asyncRoutes = filterDynamicRoutes(dynamicRoutes)
|
| | | rewriteRoutes.push({ path: '*', redirect: '/404', hidden: true })
|
| | | router.addRoutes(asyncRoutes);
|
| | | router.addRoutes(asyncRoutes)
|
| | | commit('SET_ROUTES', rewriteRoutes)
|
| | | commit('SET_SIDEBAR_ROUTERS', constantRoutes.concat(sidebarRoutes))
|
| | | commit('SET_DEFAULT_ROUTES', sidebarRoutes)
|