project init
This commit is contained in:
23
config/env.js
Normal file
23
config/env.js
Normal file
@@ -0,0 +1,23 @@
|
||||
let baseUrl = '';
|
||||
const env = process.env
|
||||
|
||||
if (env.NODE_ENV == 'development') {
|
||||
if (env.VUE_APP_PLATFORM === 'mp-weixin') {
|
||||
baseUrl = `https://testapi.jlhrms.cn`; // 开发环境地址
|
||||
}
|
||||
} else if (env.NODE_ENV == 'production') {
|
||||
if (env.VUE_APP_PLATFORM === 'mp-weixin') {
|
||||
baseUrl = `https://wxapi.jlhrms.cn`; //生产环境地址
|
||||
}
|
||||
} else if (env.NODE_ENV == 'test') {
|
||||
if (env.VUE_APP_PLATFORM === 'mp-weixin') {
|
||||
baseUrl = `https://testapi.jlhrms.cn`; //测试环境地址
|
||||
} {
|
||||
baseUrl = ``; //测试环境地址
|
||||
}
|
||||
}
|
||||
|
||||
export {
|
||||
baseUrl,
|
||||
env
|
||||
}
|
||||
Reference in New Issue
Block a user