mirror of
https://gitee.com/beijing_hongye_huicheng/lilishop-uniapp.git
synced 2026-06-21 17:30:13 +08:00
Fix H5 all-in-one asset paths
This commit is contained in:
@@ -2,6 +2,19 @@ const name = "lilishop"; //全局商城name
|
||||
const schemeName = "lilishop"; //唤醒app需要的schemeName
|
||||
const wapUrl = process.env.VUE_APP_WAP_URL || "https://m-b2b2c.pickmall.cn";
|
||||
const loginCaptchaBypass = process.env.VUE_APP_LOGIN_CAPTCHA_BYPASS === "true";
|
||||
const normalizeWsUrl = (url) => {
|
||||
// H5 可使用同域相对路径,运行时按当前页面协议补齐 WebSocket 地址。
|
||||
if (!url || /^wss?:\/\//.test(url)) {
|
||||
return url || "";
|
||||
}
|
||||
// #ifdef H5
|
||||
if (typeof window !== "undefined" && url.startsWith("/")) {
|
||||
const protocol = window.location.protocol === "https:" ? "wss:" : "ws:";
|
||||
return `${protocol}//${window.location.host}${url}`;
|
||||
}
|
||||
// #endif
|
||||
return url;
|
||||
};
|
||||
|
||||
export default {
|
||||
name: name,
|
||||
@@ -16,7 +29,7 @@ export default {
|
||||
customerServiceMobile: "13161366885", //客服电话
|
||||
customerServiceEmail: "lili@lili.com", //客服邮箱
|
||||
imWebSrc: process.env.VUE_APP_IM_WEB_URL || "https://im.pickmall.cn", //IM地址
|
||||
baseWsUrl: process.env.VUE_APP_IM_WS_URL || "wss://im-api.pickmall.cn/lili/webSocket", // IM WS 地址
|
||||
baseWsUrl: normalizeWsUrl(process.env.VUE_APP_IM_WS_URL || "/lili/webSocket"), // IM WS 地址
|
||||
loginCaptchaBypass,
|
||||
enableGetClipboard: false, //是否启用粘贴板获取 scanAuthNavigation 中的链接,如果匹配则会跳转到对应页面
|
||||
enableMiniBarStartUpApp: true, //是否在h5中右侧浮空按钮点击启动app
|
||||
|
||||
Reference in New Issue
Block a user