2021-05-13 11:03:32 +08:00
|
|
|
|
/**
|
|
|
|
|
* base : 基础业务API
|
|
|
|
|
* buyer : 买家API
|
|
|
|
|
*/
|
|
|
|
|
// 开发环境
|
|
|
|
|
const dev = {
|
2023-02-08 11:59:15 +08:00
|
|
|
|
im: "https://im-api.pickmall.cn",
|
|
|
|
|
common: "https://common-api.pickmall.cn",
|
|
|
|
|
buyer: "https://buyer-api.pickmall.cn",
|
|
|
|
|
// common: "http://192.168.0.113:8890",
|
|
|
|
|
// buyer: "http://192.168.0.113:8888",
|
|
|
|
|
// im: "http://192.168.0.113:8885",
|
2021-05-13 11:03:32 +08:00
|
|
|
|
};
|
|
|
|
|
// 生产环境
|
2021-06-25 19:01:37 +08:00
|
|
|
|
const prod = {
|
2023-01-09 19:03:29 +08:00
|
|
|
|
im: "https://im-api.pickmall.cn",
|
2021-07-28 09:53:41 +08:00
|
|
|
|
common: "https://common-api.pickmall.cn",
|
|
|
|
|
buyer: "https://buyer-api.pickmall.cn",
|
2021-05-13 11:03:32 +08:00
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
//默认生产环境
|
2021-05-21 16:47:26 +08:00
|
|
|
|
let api = dev;
|
2021-05-13 11:03:32 +08:00
|
|
|
|
//如果是开发环境
|
|
|
|
|
if (process.env.NODE_ENV == "development") {
|
2021-07-28 09:53:41 +08:00
|
|
|
|
api = dev;
|
2021-05-13 11:03:32 +08:00
|
|
|
|
} else {
|
2021-07-28 09:53:41 +08:00
|
|
|
|
api = prod;
|
2021-05-13 11:03:32 +08:00
|
|
|
|
}
|
2021-06-09 20:12:26 +08:00
|
|
|
|
//微信小程序,app的打包方式建议为生产环境,所以这块直接条件编译赋值
|
2021-05-13 11:03:32 +08:00
|
|
|
|
// #ifdef MP-WEIXIN || APP-PLUS
|
|
|
|
|
api = prod;
|
|
|
|
|
// #endif
|
|
|
|
|
|
|
|
|
|
api.buyer += "/buyer";
|
|
|
|
|
api.common += "/common";
|
2022-12-27 14:17:00 +08:00
|
|
|
|
api.im += "/im";
|
2021-05-13 11:03:32 +08:00
|
|
|
|
export default {
|
2021-07-28 09:53:41 +08:00
|
|
|
|
...api,
|
2021-05-13 11:03:32 +08:00
|
|
|
|
};
|