diff --git a/src/router/index.js b/src/router/index.js index 724458007..adee8eb9b 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -137,30 +137,30 @@ export const constantRoutes = [ // 扫码登录 { path: '/dp/login', - component: resolve => require(['@/views/login/loginNewScreen'], resolve), + component: () => import('@/views/login/loginNewScreen'), hidden: true }, // 密码登录 { path: '/dp/login1', - component: resolve => require(['@/views/login/loginScreen'], resolve), + component: () => import('@/views/login/loginScreen'), hidden: true }, // 扫码登录 { path: '/plan/login', - component: resolve => require(['@/views/login/loginNewPlan'], resolve), + component: () => import('@/views/login/loginNewPlan'), hidden: true }, // 密码登录 { path: '/plan/login1', - component: resolve => require(['@/views/login/loginPlan'], resolve), + component: () => import('@/views/login/loginPlan'), hidden: true }, { path: '/jlmap3d/edit', - component: resolve => require(['@/views/jlmap3d/jlmap3dedit'], resolve), + component: () => import('@/views/jlmap3d/jlmap3dedit'), hidden: true }, { @@ -201,32 +201,32 @@ export const asyncRouter = [ children: [ { path: 'dashboard', - component: resolve => require(['@/views/dashboard/index.vue'], resolve) + component: () => import('@/views/dashboard/index.vue') } ] }, { path: '/display/:mode', - component: resolve => require(['@/views/display/index'], resolve), + component: () => import('@/views/display/index'), meta: { }, hidden: true }, { path: '/trainroom', - component: resolve => require(['@/views/trainRoom/index'], resolve), + component: () => import('@/views/trainRoom/index'), meta: { }, hidden: true }, { path: '/jointTraining', - component: resolve => require(['@/views/jointTraining/index'], resolve), + component: () => import('@/views/jointTraining/index'), hidden: true }, { path: '/jlmap3d', - component: resolve => require(['@/views/jlmap3d/index'], resolve), + component: () => import('@/views/jlmap3d/index'), meta: { }, hidden: true @@ -241,7 +241,7 @@ export const asyncRouter = [ children: [ { path: 'skinStyle', - component: resolve => require(['@/views/map/skinStyle/index'], resolve), + component: () => import('@/views/map/skinStyle/index'), meta: { i18n: 'router.skinManage' } @@ -249,19 +249,19 @@ export const asyncRouter = [ { path: 'skinStyle/draft/:mode/:skinStyleId', hidden: true, - component: resolve => require(['@/views/map/skinStyle/draft'], resolve) + component: () => import('@/views/map/skinStyle/draft') }, { path: 'draw', redirect: '/map/draw/0/draft', - component: resolve => require(['@/views/map/mapdraft/index'], resolve), + component: () => import('@/views/map/mapdraft/index'), meta: { i18n: 'router.mapDraw' }, children: [ { path: ':mapId/:view', - component: resolve => require(['@/views/map/mapdraft/mapedit/index'], resolve), + component: () => import('@/views/map/mapdraft/mapedit/index'), hidden: true } ] @@ -269,19 +269,19 @@ export const asyncRouter = [ { path: 'runPlan', redirect: '/map/runPlan/view/draft', - component: resolve => require(['@/views/map/runplan/index'], resolve), + component: () => import('@/views/map/runplan/index'), meta: { i18n: 'router.runPlanManage' }, children: [{ path: 'view/:mode', - component: resolve => require(['@/views/map/runplan/chart'], resolve), + component: () => import('@/views/map/runplan/chart'), hidden: true }] }, { path: 'product', - component: resolve => require(['@/views/lesson/trainingcategory/index'], resolve), + component: () => import('@/views/lesson/trainingcategory/index'), meta: { i18n: 'router.productEdit' } @@ -299,28 +299,28 @@ export const asyncRouter = [ { path: 'record', redirect: '/lesson/record/training/0/null', - component: resolve => require(['@/views/lesson/trainingrecord/index'], resolve), + component: () => import('@/views/lesson/trainingrecord/index'), meta: { i18n: 'router.trainingRecord' }, children: [ { path: 'training/:trainingId/:trainingName', - component: resolve => require(['@/views/lesson/trainingrecord/manage/index'], resolve), + component: () => import('@/views/lesson/trainingrecord/manage/index'), hidden: true } ] }, { path: 'manage/taskManage', - component: resolve => require(['@/views/lesson/taskmanage/list'], resolve), + component: () => import('@/views/lesson/taskmanage/list'), meta: { i18n: 'router.taskManage' } }, { path: 'manage/trainingRule', - component: resolve => require(['@/views/lesson/trainingRule/list'], resolve), + component: () => import('@/views/lesson/trainingRule/list'), meta: { i18n: 'router.trainingRule' } @@ -328,20 +328,20 @@ export const asyncRouter = [ { path: 'manage/trainingRule/detail', hidden: true, - component: resolve => require(['@/views/lesson/trainingRule/detail/index'], resolve), + component: () => import('@/views/lesson/trainingRule/detail/index'), meta: { } }, { path: 'manage/training', - component: resolve => require(['@/views/lesson/trainingmanage/index'], resolve), + component: () => import('@/views/lesson/trainingmanage/index'), meta: { i18n: 'router.trainingManage' } }, { path: 'edit', - component: resolve => require(['@/views/lesson/lessoncategory/index'], resolve), + component: () => import('@/views/lesson/lessoncategory/index'), meta: { i18n: 'router.lessonEdit' } @@ -357,7 +357,7 @@ export const asyncRouter = [ children: [ { path: 'scriptManage', - component: resolve => require(['@/views/lesson/scriptmanage/list'], resolve), + component: () => import('@/views/lesson/scriptmanage/list'), meta: { i18n: 'router.scriptManage' } @@ -367,14 +367,14 @@ export const asyncRouter = [ { path: '/teach', redirect: '/teach/home', - component: resolve => require(['@/views/teach/index'], resolve), + component: () => import('@/views/teach/index'), meta: { roles: [admin, userLesson, user] }, children: [ { path: 'home', - component: resolve => require(['@/views/teach/home'], resolve), + component: () => import('@/views/teach/home'), meta: { i18n: 'router.teachSystem' } @@ -382,7 +382,7 @@ export const asyncRouter = [ { // 课程详情 path: 'detail/:lessonId', - component: resolve => require(['@/views/teach/detail/index'], resolve), + component: () => import('@/views/teach/detail/index'), meta: { }, hidden: true @@ -390,14 +390,14 @@ export const asyncRouter = [ { // 实训详情 path: 'practical/:trainingId/:lessonId', - component: resolve => require(['@/views/teach/practical/index'], resolve), + component: () => import('@/views/teach/practical/index'), meta: { }, hidden: true }, { path: 'pay/:lessonId', - component: resolve => require(['@/views/components/pay/index'], resolve), + component: () => import('@/views/components/pay/index'), meta: { }, hidden: true @@ -407,14 +407,14 @@ export const asyncRouter = [ { path: '/exam', redirect: '/exam/home', - component: resolve => require(['@/views/exam/index'], resolve), + component: () => import('@/views/exam/index'), meta: { roles: [admin, userExam, user] }, children: [ { path: 'home', - component: resolve => require(['@/views/exam/home'], resolve), + component: () => import('@/views/exam/home'), meta: { i18n: 'router.examSystem' } @@ -422,40 +422,40 @@ export const asyncRouter = [ { // 试卷详情 path: 'detail/:examId', - component: resolve => require(['@/views/exam/detail/examDetail'], resolve), + component: () => import('@/views/exam/detail/examDetail'), hidden: true }, { path: 'course/:lessonId', - component: resolve => require(['@/views/exam/detail/courseDetail'], resolve), + component: () => import('@/views/exam/detail/courseDetail'), hidden: true }, { // 规则管理 path: 'examRule/manage', - component: resolve => require(['@/views/publish/examRule/index'], resolve), + component: () => import('@/views/publish/examRule/index'), hidden: true }, { path: 'examRule/draft/:mode/:ruleId/:lessonId', hidden: true, - component: resolve => require(['@/views/publish/examRule/draft/index'], resolve) + component: () => import('@/views/publish/examRule/draft/index') }, { path: 'pay/:lessonId', - component: resolve => require(['@/views/components/pay/index'], resolve), + component: () => import('@/views/components/pay/index'), hidden: true }, { // 开始考试 path: 'questionDetail/:examQuestionId', - component: resolve => require(['@/views/exam/detail/questionDetail'], resolve), + component: () => import('@/views/exam/detail/questionDetail'), hidden: true }, { // 考试结果 path: 'result/:userExamId', - component: resolve => require(['@/views/exam/result'], resolve), + component: () => import('@/views/exam/result'), hidden: true } ] @@ -463,26 +463,26 @@ export const asyncRouter = [ { path: '/demonstration', redirect: '/demonstration/home', - component: resolve => require(['@/views/demonstration/index'], resolve), + component: () => import('@/views/demonstration/index'), meta: { roles: [admin, userSimulation, user] }, children: [ { path: 'home', - component: resolve => require(['@/views/demonstration/home'], resolve), + component: () => import('@/views/demonstration/home'), meta: { i18n: 'router.demonstrationSystem' } }, { path: 'detail/:mapId', - component: resolve => require(['@/views/demonstration/detail/index'], resolve), + component: () => import('@/views/demonstration/detail/index'), hidden: true }, { path: 'pay/:lessonId', - component: resolve => require(['@/views/components/pay/index'], resolve), + component: () => import('@/views/components/pay/index'), hidden: true } ] @@ -490,14 +490,14 @@ export const asyncRouter = [ { path: '/dp', redirect: '/dp/home', - component: resolve => require(['@/views/screenMonitor/index'], resolve), + component: () => import('@/views/screenMonitor/index'), meta: { roles: [admin, userScreen, user] }, children: [ { path: 'home', - component: resolve => require(['@/views/screenMonitor/home'], resolve), + component: () => import('@/views/screenMonitor/home'), meta: { i18n: 'router.dpSystem' }, @@ -505,19 +505,19 @@ export const asyncRouter = [ }, { path: 'detail/:lessonId', - component: resolve => require(['@/views/screenMonitor/detail/index'], resolve), + component: () => import('@/views/screenMonitor/detail/index'), hidden: true }, { path: 'pay/:lessonId', - component: resolve => require(['@/views/components/pay/index'], resolve), + component: () => import('@/views/components/pay/index'), hidden: true } ] }, { path: '/plan/tool', - component: resolve => require(['@/views/planMonitor/editTool/index'], resolve), + component: () => import('@/views/planMonitor/editTool/index'), meta: { }, hidden: true @@ -525,14 +525,14 @@ export const asyncRouter = [ { path: '/plan', redirect: '/plan/home', - component: resolve => require(['@/views/planMonitor/index'], resolve), + component: () => import('@/views/planMonitor/index'), meta: { roles: [admin, user] }, children: [ { path: 'home', - component: resolve => require(['@/views/planMonitor/home'], resolve), + component: () => import('@/views/planMonitor/home'), meta: { i18n: 'router.planSystem' }, @@ -540,12 +540,12 @@ export const asyncRouter = [ }, { path: 'detail/:lessonId', - component: resolve => require(['@/views/planMonitor/detail'], resolve), + component: () => import('@/views/planMonitor/detail'), hidden: true }, { path: 'pay/:lessonId', - component: resolve => require(['@/views/components/pay/index'], resolve), + component: () => import('@/views/components/pay/index'), hidden: true } ] @@ -559,7 +559,7 @@ export const asyncRouter = [ children: [ { path: 'manage', - component: resolve => require(['@/views/replay/index'], resolve), + component: () => import('@/views/replay/index'), meta: { i18n: 'router.replayManage' } @@ -575,14 +575,14 @@ export const asyncRouter = [ children: [ { path: 'manage', - component: resolve => require(['@/views/package/index'], resolve), + component: () => import('@/views/package/index'), meta: { i18n: 'router.permissionManage' } }, { path: 'draft', - component: resolve => require(['@/views/package/draft/ruleForm'], resolve), + component: () => import('@/views/package/draft/ruleForm'), hidden: true } ] @@ -597,78 +597,78 @@ export const asyncRouter = [ children: [ { path: 'map', - component: resolve => require(['@/views/publish/publishMap/index'], resolve), + component: () => import('@/views/publish/publishMap/index'), meta: { i18n: 'router.publishMapManage' } }, { path: 'product', - component: resolve => require(['@/views/publish/productStatus/index'], resolve), + component: () => import('@/views/publish/productStatus/index'), meta: { i18n: 'router.productStateManage' } }, { path: 'lesson', - component: resolve => require(['@/views/publish/publishLesson/index'], resolve), + component: () => import('@/views/publish/publishLesson/index'), meta: { i18n: 'router.publishLessonManage' } }, // { // path: 'script', - // component: resolve => require(['@/views/publish/simulationScript/index'], resolve), + // component:() => import('@/views/publish/simulationScript/index'), // meta: { // title: '仿真脚本管理', // } // }, { path: 'runPlan/template', - component: resolve => require(['@/views/publish/runPlanTemplate/index'], resolve), + component: () => import('@/views/publish/runPlanTemplate/index'), meta: { i18n: 'router.runPlanTemplateManage' } }, { path: 'runPlan/common', - component: resolve => require(['@/views/publish/runPlanCommon/index'], resolve), + component: () => import('@/views/publish/runPlanCommon/index'), meta: { i18n: 'router.runPlanCommonManage' } }, { path: 'runPlan/everyDay', - component: resolve => require(['@/views/publish/runPlanEveryDay/index'], resolve), + component: () => import('@/views/publish/runPlanEveryDay/index'), meta: { i18n: 'router.runPlanEveryDayManage' } }, { path: 'examRule/manage', - component: resolve => require(['@/views/publish/examRule/index'], resolve), + component: () => import('@/views/publish/examRule/index'), meta: { i18n: 'router.examRuleManage' } }, { path: 'map/draft/:mode/:mapId', - component: resolve => require(['@/views/publish/publishMap/draft'], resolve), + component: () => import('@/views/publish/publishMap/draft'), hidden: true }, { path: 'examRule/draft/:mode/:ruleId/:lessonId', - component: resolve => require(['@/views/publish/examRule/draft/index'], resolve), + component: () => import('@/views/publish/examRule/draft/index'), hidden: true }, { path: 'runPlan/common/:mode', - component: resolve => require(['@/views/publish/runPlanCommon/draft'], resolve), + component: () => import('@/views/publish/runPlanCommon/draft'), hidden: true }, { path: 'runPlan/view/:mode', - component: resolve => require(['@/views/map/runplan/chart'], resolve), + component: () => import('@/views/map/runplan/chart'), hidden: true } ] @@ -683,28 +683,28 @@ export const asyncRouter = [ children: [ { path: 'commodity/manage', - component: resolve => require(['@/views/orderauthor/commodity/index'], resolve), + component: () => import('@/views/orderauthor/commodity/index'), meta: { i18n: 'router.commodityManage' } }, { path: 'order/manage', - component: resolve => require(['@/views/orderauthor/order/list'], resolve), + component: () => import('@/views/orderauthor/order/list'), meta: { i18n: 'router.orderManage' } }, { path: 'author/manage', - component: resolve => require(['@/views/orderauthor/author/index'], resolve), + component: () => import('@/views/orderauthor/author/index'), meta: { i18n: 'router.authorityManage' } }, { path: 'transfer/manage', - component: resolve => require(['@/views/orderauthor/permission/index'], resolve), + component: () => import('@/views/orderauthor/permission/index'), meta: { i18n: 'router.authorityTransferManage' } @@ -712,7 +712,7 @@ export const asyncRouter = [ { path: 'commodity/draft/:mode/:commodityId', hidden: true, - component: resolve => require(['@/views/orderauthor/commodity/draft'], resolve), + component: () => import('@/views/orderauthor/commodity/draft'), meta: { i18n: 'router.addCommodity' } @@ -720,7 +720,7 @@ export const asyncRouter = [ { path: 'order/draft/:mode/:orderId', hidden: true, - component: resolve => require(['@/views/orderauthor/order/draft'], resolve), + component: () => import('@/views/orderauthor/order/draft'), meta: { i18n: 'router.addOrder' } @@ -728,19 +728,19 @@ export const asyncRouter = [ { path: 'author/draft/:mode/:userId', hidden: true, - component: resolve => require(['@/views/orderauthor/author/draft'], resolve), + component: () => import('@/views/orderauthor/author/draft'), meta: { i18n: 'router.addCoursePermissions' } }, { path: 'transfer/detail/:permissionId', - component: resolve => require(['@/views/orderauthor/permission/detail'], resolve), + component: () => import('@/views/orderauthor/permission/detail'), hidden: true }, { path: 'transfer/package', - component: resolve => require(['@/views/orderauthor/permission/draft/ruleForm'], resolve), + component: () => import('@/views/orderauthor/permission/draft/ruleForm'), hidden: true } ] @@ -755,7 +755,7 @@ export const asyncRouter = [ children: [ { path: 'dictionary', - component: resolve => require(['@/views/management/dictionary/index'], resolve), + component: () => import('@/views/management/dictionary/index'), meta: { i18n: 'router.dataDictionary' } @@ -763,42 +763,42 @@ export const asyncRouter = [ { path: 'dictionary/detail', hidden: true, - component: resolve => require(['@/views/management/dictionaryDetail/index'], resolve), + component: () => import('@/views/management/dictionaryDetail/index'), meta: { i18n: 'router.dataDictionaryDetails' } }, { path: 'userManage', - component: resolve => require(['@/views/management/userControl/index'], resolve), + component: () => import('@/views/management/userControl/index'), meta: { i18n: 'router.userManage' } }, { path: 'userTrainingManage', - component: resolve => require(['@/views/management/userTraining/index'], resolve), + component: () => import('@/views/management/userTraining/index'), meta: { i18n: 'router.userTrainingManage' } }, { path: 'userExamManage', - component: resolve => require(['@/views/management/userExam/index'], resolve), + component: () => import('@/views/management/userExam/index'), meta: { i18n: 'router.userExamManage' } }, { path: 'userSimulationManage', - component: resolve => require(['@/views/management/userSimulation/index'], resolve), + component: () => import('@/views/management/userSimulation/index'), meta: { i18n: 'router.userSimulationManage' } }, { path: 'existingSimulation', - component: resolve => require(['@/views/management/existingSimulation/index'], resolve), + component: () => import('@/views/management/existingSimulation/index'), meta: { i18n: 'router.existingSimulation' } diff --git a/src/utils/baseUrl.js b/src/utils/baseUrl.js index 72be3b2f1..2e575c51e 100644 --- a/src/utils/baseUrl.js +++ b/src/utils/baseUrl.js @@ -3,8 +3,8 @@ export function getBaseUrl() { let BASE_API; if (process.env.NODE_ENV === 'development') { // BASE_API = 'https://joylink.club/jlcloud'; - // BASE_API = 'https://test.joylink.club/jlcloud'; - BASE_API = 'http://192.168.3.5:9000'; // 袁琪 + BASE_API = 'https://test.joylink.club/jlcloud'; + // BASE_API = 'http://192.168.3.5:9000'; // 袁琪 // BASE_API = 'http://192.168.3.6:9000'; // 旭强 // BASE_API = 'http://192.168.3.4:9000' // 琰培 } else {