hengmei-two/jsFile/config.js

31 lines
602 B
JavaScript
Raw Normal View History

2021-08-19 14:40:59 +08:00
const ENV = process.env.NODE_ENV;
2021-08-26 09:50:19 +08:00
console.log('当前环境', process.env.NODE_ENV)
2021-08-19 14:40:59 +08:00
const apiHub = {
//开发环境
development: {
2022-02-17 11:49:34 +08:00
BASE_URL: `${uni.getStorageSync('hostapi')}`,
2021-08-19 14:40:59 +08:00
IMG_URL: "https://xx",
BASE_UPLOAD_URL: "",
},
//测试环境
test: {
BASE_URL: "https://xxx",
IMG_URL: "https://xxx",
BASE_UPLOAD_URL: "",
},
//生产环境
production: {
BASE_URL: "https://xx",
IMG_URL: "https://xx",
BASE_UPLOAD_URL: "",
}
}
// 导出配置
export default {
ENV: ENV,
...apiHub[ENV]
}