Commit 91df9c82 authored by xulili's avatar xulili

修改环境api

parent 3e5c8148
# 页面 title 前缀
NODE_ENV = development
VUE_APP_TITLE = 亿百分-dev
VUE_OY_API = /api/
VUE_APP_API_A = http://139.155.48.151:8085
VUE_APP_API_B = http://111.26.165.55:8010/crminterface.ashx
# 页面 title 前缀
NODE_ENV = development
VUE_APP_TITLE = 亿百分-dev
VUE_OY_API = http://111.26.165.55:8010/crminterface.ashx
VUE_APP_API_A = http://139.155.48.151:8085
VUE_APP_API_B = http://111.26.165.55:8010/crminterface.ashx
# 页面 title 前缀
NODE_ENV = production
VUE_APP_TITLE = 亿百分-prod
VUE_OY_API = http://111.26.165.55:8010/crminterface.ashx
VUE_APP_API_A = http://139.155.48.151:8085
VUE_APP_API_B = http://111.26.165.55:8010/crminterface.ashx
const envConfig = {
appOyAPI: process.env.VUE_OX_API,
appBaseUrlA: process.env.VUE_APP_API_A,
appBaseUrlB: process.env.VUE_APP_API_B,
}
export default envConfig
...@@ -6,7 +6,9 @@ ...@@ -6,7 +6,9 @@
"start": "vue-cli-service serve", "start": "vue-cli-service serve",
"serve": "vue-cli-service serve", "serve": "vue-cli-service serve",
"build": "vue-cli-service build", "build": "vue-cli-service build",
"lint": "vue-cli-service lint" "lint": "vue-cli-service lint",
"build:dev": "vue-cli-service build --mode dev",
"build:prod": "vue-cli-service build --mode prod"
}, },
"dependencies": { "dependencies": {
"axios": "^0.19.1", "axios": "^0.19.1",
......
import axios from 'axios' import axios from 'axios'
import { Message, MessageBox } from 'element-ui' import { Message, MessageBox } from 'element-ui'
import Router from '../router' import Router from '../router'
import envConfig from '@/config/env-config'
// import store from '../store' // import store from '../store'
// import { getToken } from '@/utils/auth' // import { getToken } from '@/utils/auth'
...@@ -9,7 +10,8 @@ import Router from '../router' ...@@ -9,7 +10,8 @@ import Router from '../router'
let INFO = { let INFO = {
corpId: 'wwd1cdbca7b8b2b6c4', corpId: 'wwd1cdbca7b8b2b6c4',
agentId: '1000015', agentId: '1000015',
url: 'http://139.155.48.151:8085', // url: 'http://139.155.48.151:8085',
url: envConfig.appBaseUrlA,
} }
// 创建axios实例 // 创建axios实例
......
import axios from 'axios' import axios from 'axios'
import envConfig from '@/config/env-config'
export function wxRequest(inUrl, data = {}, header = {}, method = 'post') { export function wxRequest(inUrl, data = {}, header = {}, method = 'post') {
// let URL = `http://172.16.0.111:8081${url}` // let URL = `http://172.16.0.111:8081${url}`
// let URL = `http://139.155.48.151:8081${url}` // let URL = `http://139.155.48.151:8081${url}`
...@@ -8,7 +8,8 @@ export function wxRequest(inUrl, data = {}, header = {}, method = 'post') { ...@@ -8,7 +8,8 @@ export function wxRequest(inUrl, data = {}, header = {}, method = 'post') {
let INFO = { let INFO = {
corpId: 'wwd1cdbca7b8b2b6c4', corpId: 'wwd1cdbca7b8b2b6c4',
agentId: '1000015', agentId: '1000015',
url: 'http://139.155.48.151:8085' + inUrl, // url: 'http://139.155.48.151:8085' + inUrl,
url: envConfig.appBaseUrlA + inUrl,
} }
if (method == 'post') { if (method == 'post') {
...@@ -41,4 +42,4 @@ export function wxRequest(inUrl, data = {}, header = {}, method = 'post') { ...@@ -41,4 +42,4 @@ export function wxRequest(inUrl, data = {}, header = {}, method = 'post') {
}) })
} }
} }
\ No newline at end of file
import axios from 'axios' import axios from 'axios'
import md5 from "js-md5" import md5 from "js-md5"
import envConfig from '@/config/env-config'
// let BASE_API = "https://gd.chfatech.com/guangdian" // let BASE_API = "https://gd.chfatech.com/guangdian"
// let BASE_API = "/api/" // let BASE_API = "/api/"
let BASE_API = "/api" let BASE_API = envConfig.appOyAPI
const zlog = console.log.bind(console) const zlog = console.log.bind(console)
......
import axios from 'axios' import axios from 'axios'
import md5 from "js-md5" import md5 from "js-md5"
import envConfig from '@/config/env-config'
// let BASE_API = "https://gd.chfatech.com/guangdian" // let BASE_API = "https://gd.chfatech.com/guangdian"
let BASE_API = "/api/" let BASE_API = envConfig.appOyAPI
const zlog = console.log.bind(console) const zlog = console.log.bind(console)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment