uu
This commit is contained in:
parent
aa8141f654
commit
49d342dc64
@ -1,5 +1,6 @@
|
||||
// TODO 区分环境
|
||||
export const host = 'http://47.102.220.189:58089/api/bizsvr'
|
||||
import { curEnvConf } from "../env"
|
||||
|
||||
export const host = curEnvConf.apiHost
|
||||
|
||||
export default {
|
||||
uploadFile: '/common/ossUpload',
|
||||
|
||||
19
common/env.js
Normal file
19
common/env.js
Normal file
@ -0,0 +1,19 @@
|
||||
let envMap = {
|
||||
development: {
|
||||
apiHost: 'http://47.102.220.189:58089/api/bizsvr',
|
||||
},
|
||||
production: {
|
||||
apiHost: 'http://api.emis.tanex56.com/api/bizsvr',
|
||||
}
|
||||
}
|
||||
let curEnvConf
|
||||
if (process.env.NODE_ENV === 'development') {
|
||||
curEnvConf = envMap.development
|
||||
console.log('开发环境curEnvConf======', curEnvConf)
|
||||
} else {
|
||||
curEnvConf = envMap.production
|
||||
console.log('正式环境curEnvConf======', curEnvConf)
|
||||
}
|
||||
export {
|
||||
curEnvConf
|
||||
}
|
||||
Loading…
Reference in New Issue
Block a user