@@ -0,0 +1,2 @@ | |||
NODE_ENV=development | |||
VUE_APP_BASE_URL="http://47.98.157.120:9031/api/" |
@@ -0,0 +1,2 @@ | |||
NODE_ENV=production | |||
VUE_APP_BASE_URL="http://121.40.249.52:9031/api/" |
@@ -0,0 +1,2 @@ | |||
NODE_ENV=test | |||
VUE_APP_BASE_URL="http://47.98.157.120:9031/api/" |
@@ -5,7 +5,10 @@ | |||
"scripts": { | |||
"dev": "vue-cli-service serve", | |||
"build": "vue-cli-service build", | |||
"lint": "vue-cli-service lint" | |||
"lint": "vue-cli-service lint", | |||
"build:dev": "vue-cli-service build --mode development", | |||
"build:test": "vue-cli-service build --mode test", | |||
"build:prod": "vue-cli-service build --mode production" | |||
}, | |||
"dependencies": { | |||
"@riophae/vue-treeselect": "^0.4.0", |
@@ -5,7 +5,7 @@ export default { | |||
version: '1.0', | |||
name: 'JNDZ考核管理系统', // 项目名称 | |||
// baseURL: 'http://121.40.249.52:9031/api/', // 正式环境 | |||
baseURL:'http://47.98.157.120:9031/api/', //测试环境 | |||
baseURL:process.env.VUE_APP_BASE_URL, | |||
whiteList: ['/login', '/forget'], // 路由白名单(不需要登录的) | |||
keepAliveList: [], // 需要缓存的组件名称 | |||
menuUrl: '/index/getMenuList', // 菜单数据接口 |
@@ -87,7 +87,7 @@ function menusToRoute(menus) { | |||
} | |||
route.children.push({ | |||
path: item.path, name: item.name || item.path, meta: item.meta, | |||
component: () => import('@/views' + (item.component || item.path)) | |||
component: (resolve) => require('@/views' + (item.component || item.path),resolve) | |||
}); | |||
} | |||
}); |