You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
34 lines
932 B
34 lines
932 B
import dev from "@/config/dev";
|
|
import prod from "@/config/prod";
|
|
|
|
const isDev = process.env.NODE_ENV === "development";
|
|
|
|
const baseConfig = {
|
|
BASE_LIVE_URL: "https://system.menghangjiaoyu.cn",
|
|
IMAGE_ASSETS_URL: "https://system.menghangjiaoyu.cn",
|
|
Url_SCHEMES: "system.menghangjiaoyu.cn",
|
|
...(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; |