Commit 8e5e19b7 by 姜雷

载入路由错误后继续载入其他路由

parent 9cd3e695
...@@ -3,14 +3,23 @@ import System from '../lib/main'; ...@@ -3,14 +3,23 @@ import System from '../lib/main';
window.manageShell = { default: System }; window.manageShell = { default: System };
setTimeout(() => { setTimeout(() => {
let allAasyncRouterMap = [ let allAasyncRouterMap = [];
...customerManage.default, let routeNameList = [
...baseManage.default, 'customerManage',
...systemManage.default, 'baseManage',
...operateManage.default, 'systemManage',
...statisticsManage.default, 'operateManage',
...deviceManage.default, 'statisticsManage',
'deviceManage',
]; ];
routeNameList.map(name => {
try {
allAasyncRouterMap = allAasyncRouterMap.concat(window[name].default);
} catch (error) {
console.error(name + ': ', error);
}
return name;
});
System.createSystem({ System.createSystem({
basePath: process.env.VUE_APP_BASE_URL, basePath: process.env.VUE_APP_BASE_URL,
......
let allAasyncRouterMap = [ let allAasyncRouterMap = [];
...customerManage.default, let routeNameList = [
...baseManage.default, 'customerManage',
...systemManage.default, 'baseManage',
...operateManage.default, 'systemManage',
...statisticsManage.default, 'operateManage',
...deviceManage.default, 'statisticsManage',
'deviceManage',
]; ];
routeNameList.map(name => {
try {
allAasyncRouterMap = allAasyncRouterMap.concat(window[name].default);
} catch (error) {
console.error(name + ': ', error);
}
return name;
});
const System = manageShell.default; const System = manageShell.default;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment