import dev from "@/config/dev"; import prod from "@/config/prod"; const isDev = process.env.NODE_ENV === "development"; const baseConfig = { BASE_LIVE_URL: "https://demo.zhishi.tczxkj.com", IMAGE_ASSETS_URL: "https://demo.zhishi.tczxkj.com", Url_SCHEMES: "demo.zhishi.tczxkj.com", ...(isDev ? dev : prod) }; // 缓存时间 0 永久 export const EXPIRE = 0; // #ifdef H5 (() => { const protocol = window.location.protocol === "http:" ? "ws" : "wss"; const host = window.location.host; const APP_WS_URL = `${protocol}://${host}/wss?channel=kefu`; baseConfig.APP_WS_URL = APP_WS_URL; })(); // #endif // #ifndef H5 (() => { let [protocol, host] = baseConfig.HTTP_REQUEST_URL.split("//"); protocol = protocol === "http:" ? "ws" : "wss"; const APP_WS_URL = `${protocol}://${host}/wss?channel=kefu`; baseConfig.APP_WS_URL = APP_WS_URL; })(); // #endif export default baseConfig;