init
This commit is contained in:
23
src/config/env.js
Normal file
23
src/config/env.js
Normal file
@@ -0,0 +1,23 @@
|
||||
/**
|
||||
* 配置编译环境和线上环境之间的切换
|
||||
*
|
||||
* baseUrl: 域名地址
|
||||
* imgBaseUrl: 图片所在域名地址
|
||||
*
|
||||
*/
|
||||
|
||||
let baseUrl = ''
|
||||
let imgBaseUrl = ''
|
||||
|
||||
if (process.env.NODE_ENV === 'development') {
|
||||
baseUrl = 'http://192.168.81.107:8080'
|
||||
imgBaseUrl = 'http://192.168.81.156:8081/hl_nlapp/'
|
||||
} else if (process.env.NODE_ENV === 'production') {
|
||||
baseUrl = 'http://192.168.81.138:8080'
|
||||
imgBaseUrl = 'http://192.168.81.156:8081/hl_nlapp/'
|
||||
}
|
||||
|
||||
export {
|
||||
baseUrl,
|
||||
imgBaseUrl
|
||||
}
|
||||
Reference in New Issue
Block a user