Ver código fonte

配置多环境发布

master
yangzhou-cyber 3 anos atrás
pai
commit
2f7f8a59c5
6 arquivos alterados com 12 adições e 3 exclusões
  1. +2
    -0
      .env.development
  2. +2
    -0
      .env.production
  3. +2
    -0
      .env.test
  4. +4
    -1
      package.json
  5. +1
    -1
      src/config/setting.js
  6. +1
    -1
      src/store/modules/user.js

+ 2
- 0
.env.development Ver arquivo

@@ -0,0 +1,2 @@
NODE_ENV=development
VUE_APP_BASE_URL="http://47.98.157.120:9031/api/"

+ 2
- 0
.env.production Ver arquivo

@@ -0,0 +1,2 @@
NODE_ENV=production
VUE_APP_BASE_URL="http://121.40.249.52:9031/api/"

+ 2
- 0
.env.test Ver arquivo

@@ -0,0 +1,2 @@
NODE_ENV=test
VUE_APP_BASE_URL="http://47.98.157.120:9031/api/"

+ 4
- 1
package.json Ver arquivo

@@ -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",

+ 1
- 1
src/config/setting.js Ver arquivo

@@ -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', // 菜单数据接口

+ 1
- 1
src/store/modules/user.js Ver arquivo

@@ -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)
});
}
});

Carregando…
Cancelar
Salvar