2025-03-14 16:27:50 +08:00
|
|
|
|
/**
|
|
|
|
|
* base : 基础业务API
|
|
|
|
|
* buyer : 买家API
|
|
|
|
|
*/
|
|
|
|
|
// 开发环境
|
|
|
|
|
const dev = {
|
2025-05-02 17:32:03 +08:00
|
|
|
|
// common: "http://192.168.1.211:8890",
|
|
|
|
|
// buyer: "http://192.168.1.211:8888",
|
|
|
|
|
// vlog: "http://192.168.1.211:8099",
|
|
|
|
|
// web: "http://192.168.1.211:8099",
|
|
|
|
|
// seller: "http://192.168.1.211:8889",
|
2025-04-30 14:42:40 +08:00
|
|
|
|
common: "http://43.143.227.203:8890",
|
|
|
|
|
buyer: "http://43.143.227.203:8888",
|
|
|
|
|
vlog: "http://43.143.227.203:8099",
|
|
|
|
|
web: "http://43.143.227.203:8099",
|
|
|
|
|
seller: "http://43.143.227.203:8889",
|
2025-05-02 17:22:45 +08:00
|
|
|
|
|
2025-03-14 16:27:50 +08:00
|
|
|
|
};
|
|
|
|
|
// 生产环境
|
|
|
|
|
const prod = {
|
2025-05-03 18:34:59 +08:00
|
|
|
|
// common: "http://192.168.1.211:8890",
|
|
|
|
|
// buyer: "http://192.168.1.211:8888",
|
2025-04-30 14:42:40 +08:00
|
|
|
|
common: "http://43.143.227.203:8890",
|
|
|
|
|
buyer: "http://43.143.227.203:8888",
|
|
|
|
|
vlog: "http://43.143.227.203:8099",
|
|
|
|
|
web: "http://43.143.227.203:8099",
|
|
|
|
|
seller: "http://43.143.227.203:8889",
|
2025-03-14 16:27:50 +08:00
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
//默认生产环境
|
|
|
|
|
let api = dev;
|
|
|
|
|
//如果是开发环境
|
|
|
|
|
if (process.env.NODE_ENV == "development") {
|
|
|
|
|
api = dev;
|
|
|
|
|
} else {
|
|
|
|
|
api = prod;
|
|
|
|
|
}
|
|
|
|
|
//微信小程序,app的打包方式建议为生产环境,所以这块直接条件编译赋值
|
|
|
|
|
// #ifdef MP-WEIXIN || APP-PLUS
|
|
|
|
|
api = prod;
|
|
|
|
|
// #endif
|
|
|
|
|
|
|
|
|
|
api.buyer += "/buyer";
|
|
|
|
|
api.common += "/common";
|
|
|
|
|
export default {
|
|
|
|
|
...api,
|
|
|
|
|
};
|