测试环境调整

ywj_dev
wj 2 years ago
parent 657d3cf692
commit 3de15f5611

@ -36,33 +36,33 @@ export const constantRoutes = [
children: [
{
path: '/redirect/:path(.*)',
component: () => import('@/views/redirect')
component: (resolve) => require('@/views/redirect')
}
]
},
{
path: '/login',
component: () => import('@/views/myLogin'),
component: (resolve) => require('@/views/myLogin'),
hidden: true
},
{
path: '/register',
component: () => import('@/views/register'),
component: (resolve) => require('@/views/register'),
hidden: true
},
{
path: '/forgetPasswd',
component: () => import('@/views/forgetPasswd'),
component: (resolve) => require('@/views/forgetPasswd'),
hidden: true
},
{
path: '/404',
component: () => import('@/views/error/404'),
component: (resolve) => require('@/views/error/404'),
hidden: true
},
{
path: '/401',
component: () => import('@/views/error/401'),
component: (resolve) => require('@/views/error/401'),
hidden: true
},
{
@ -72,7 +72,7 @@ export const constantRoutes = [
children: [
{
path: 'index',
component: () => import('@/views/index'),
component: (resolve) => require('@/views/index'),
name: 'Index',
meta: { title: '首页', icon: 'dashboard', affix: true }
}
@ -86,7 +86,7 @@ export const constantRoutes = [
children: [
{
path: 'profile',
component: () => import('@/views/system/user/profile/index'),
component: (resolve) => require('@/views/system/user/profile/index'),
name: 'Profile',
meta: { title: '个人中心', icon: 'user' }
}
@ -104,7 +104,7 @@ export const dynamicRoutes = [
children: [
{
path: 'role/:userId(\\d+)',
component: () => import('@/views/system/user/authRole'),
component: (resolve) => require('@/views/system/user/authRole'),
name: 'AuthRole',
meta: { title: '分配角色', activeMenu: '/system/user' }
}
@ -118,7 +118,7 @@ export const dynamicRoutes = [
children: [
{
path: 'user/:roleId(\\d+)',
component: () => import('@/views/system/role/authUser'),
component: (resolve) => require('@/views/system/role/authUser'),
name: 'AuthUser',
meta: { title: '分配用户', activeMenu: '/system/role' }
}
@ -132,7 +132,7 @@ export const dynamicRoutes = [
children: [
{
path: 'index/:dictId(\\d+)',
component: () => import('@/views/system/dict/data'),
component: (resolve) => require('@/views/system/dict/data'),
name: 'Data',
meta: { title: '字典数据', activeMenu: '/system/dict' }
}
@ -146,7 +146,7 @@ export const dynamicRoutes = [
children: [
{
path: 'index',
component: () => import('@/views/system/oss/config'),
component: (resolve) => require('@/views/system/oss/config'),
name: 'OssConfig',
meta: { title: '配置管理', activeMenu: '/system/oss' }
}
@ -160,7 +160,7 @@ export const dynamicRoutes = [
children: [
{
path: 'index/:tableId(\\d+)',
component: () => import('@/views/tool/gen/editTable'),
component: (resolve) => require('@/views/tool/gen/editTable',resolve),
name: 'GenEdit',
meta: { title: '修改生成配置', activeMenu: '/tool/gen' }
}
@ -182,5 +182,5 @@ export default new Router({
scrollBehavior: () => ({ y: 0 }),
routes: constantRoutes,
})

@ -126,7 +126,8 @@ export const loadView = (view) => {
return (resolve) => require([`@/views/${view}`], resolve)
} else {
// 使用 import 实现生产环境的路由懒加载
return () => import(`@/views/${view}`)
// return () => import(`@/views/${view}`)
return (resolve) => require([`@/views/${view}`], resolve)
}
}

Loading…
Cancel
Save