Files
lilishop-uniapp/config/api.js
2026-07-13 16:51:57 +08:00

36 lines
764 B
JavaScript
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/**
* buyer : 买家 APIbaseURL 为 buyer + /buyer
*/
// 开发环境
const dev = {
buyer: "https://buyer-api.pickmall.cn",
im: "https://im-api.pickmall.cn",
mqtt: "wss://lilishop-mqtt-pull.dllll.xyz/mqtt",
};
// 生产环境
const prod = {
buyer: "https://buyer-api.pickmall.cn",
im: "https://im-api.pickmall.cn",
mqtt: "wss://lilishop-mqtt-pull.dllll.xyz/mqtt",
};
let api = dev;
if (process.env.NODE_ENV == "development") {
api = dev;
} else {
api = prod;
}
// 微信小程序、App 打包使用生产环境配置
// #ifdef MP-WEIXIN || APP-PLUS
api = prod;
// #endif
const buyerHost = api.buyer;
api.buyer = buyerHost + "/buyer";
api.im = api.im + "/im";
export default {
...api,
buyerHost,
};