|
|
|
|
@ -37,7 +37,8 @@ export function filterAsyncRoutes(routes) {
|
|
|
|
|
guard: route.guard_name,
|
|
|
|
|
folder: route.folder,
|
|
|
|
|
isModule: !/^\/./.test(route.path),
|
|
|
|
|
moduleUri: /^\/./.test(route.path) ? '' : `${process.env.VUE_APP_BASE_API}/${route.path}`,
|
|
|
|
|
moduleUri: /^\/./.test(route.path) ? '' : `http://localhost:9529/${route.path}`,
|
|
|
|
|
moduleName: /^\/./.test(route.path) ? '' : route.path,
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@ -71,7 +72,6 @@ const actions = {
|
|
|
|
|
accessedRoutes = filterAsyncRoutes(routes)
|
|
|
|
|
//把404拦截放在最后匹配
|
|
|
|
|
accessedRoutes.push({ path: '*', redirect: '/404', hidden: true })
|
|
|
|
|
console.log(333,accessedRoutes)
|
|
|
|
|
commit('SET_ROUTES', accessedRoutes)
|
|
|
|
|
resolve(accessedRoutes)
|
|
|
|
|
} catch (err) {
|
|
|
|
|
|