forked from angelo/web-retail-h5
chore(package): add env
This commit is contained in:
parent
21b75f40b8
commit
f72f4930fa
|
@ -10,7 +10,16 @@ module.exports = (vm) => {
|
|||
uni.$u.http.setConfig((config) => {
|
||||
// config.baseURL = 'https://p1.hzs413.com/inter-api';
|
||||
// 192.168.0.100:8080
|
||||
|
||||
//#ifdef DEV_SERVER
|
||||
console.log('DEV_SERVER')
|
||||
config.baseURL = 'http://192.168.0.100:8080';
|
||||
//#endif
|
||||
|
||||
//#ifdef QA_SERVER
|
||||
console.log('QA_SERVER')
|
||||
config.baseURL = 'http://60.205.203.247/prod-api';
|
||||
//#endif
|
||||
config.timeout = 30000;
|
||||
return config
|
||||
})
|
||||
|
|
24
package.json
24
package.json
|
@ -33,5 +33,27 @@
|
|||
},
|
||||
"keywords": [],
|
||||
"author": "",
|
||||
"license": "ISC"
|
||||
"license": "ISC",
|
||||
"uni-app": {
|
||||
"scripts": {
|
||||
"dev-env": {
|
||||
"title": "开发环境",
|
||||
"env": {
|
||||
"UNI_PLATFORM": "h5"
|
||||
},
|
||||
"define": {
|
||||
"DEV_SERVER": true
|
||||
}
|
||||
},
|
||||
"prod-env": {
|
||||
"title": "测试环境",
|
||||
"env": {
|
||||
"UNI_PLATFORM": "h5"
|
||||
},
|
||||
"define": {
|
||||
"QA_SERVER": true
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue