Browse Source

环境变量调整

test
lingxiao 2 years ago
parent
commit
ddf7a1a643
4 changed files with 8 additions and 7 deletions
  1. +3
    -3
      .env.JIS5300
  2. +1
    -1
      .env.TRIM
  3. +2
    -1
      src/server/request.js
  4. +2
    -2
      vue.config.js

+ 3
- 3
.env.JIS5300 View File

@ -1,4 +1,4 @@
NODE_ENV = 'production'
VUE_APP_BASE_URL = http://10.104.120.109:9010/
VUE_APP_LOGIN_TITLE = 安道拓南通面套工厂COS系统
VUE_APP_LOGIN_LOGO = ../assets/img/logo.png
VUE_APP_BASE_URL = http://101.201.121.115:9010/
VUE_APP_LOGIN_TITLE = SCCP JIS系统
VUE_APP_LOGIN_LOGO = ../assets/img/logo.png

+ 1
- 1
.env.TRIM View File

@ -1,4 +1,4 @@
NODE_ENV = 'production'
VUE_APP_BASE_URL = http://10.104.120.109:9010/
VUE_APP_BASE_URL = http://101.201.121.115:9010/
VUE_APP_LOGIN_TITLE = 安道拓南通面套工厂COS系统
VUE_APP_LOGIN_LOGO = ../assets/img/logo.png

+ 2
- 1
src/server/request.js View File

@ -2,7 +2,8 @@ import axios from "axios";
// create an axios instance
const service = axios.create({
baseURL: process.env.VUE_APP_BASE_URL || 'http://101.201.121.115:9010/',
// baseURL: process.env.VUE_APP_BASE_URL || 'http://101.201.121.115:9010/',
baseURL:"/sylxzk/etl/"
// timeout: 20000, // request timeout
});
// request interceptor


+ 2
- 2
vue.config.js View File

@ -17,12 +17,12 @@ module.exports = {
host: "localhost",
open: true,
proxy: {
"/user": {
"/sylxzk/etl/": {
target: process.env.VUE_APP_BASE_URL || 'http://101.201.121.115:9010/', //要跨域的域名 目标地址
changeOrigin: true, //是否开启跨域 是否更改源路径
ws: true,
pathRewrite: {
"^/user": "", // /api/ / 凡是/api开头的地址都可以跨域
"^/sylxzk/etl/": "",
},
},
},


Loading…
Cancel
Save