fix: 点餐分享链接

This commit is contained in:
whitechiina 2025-09-19 10:52:42 +08:00
parent 892d6f3707
commit bf6ec12b11
3 changed files with 7 additions and 7 deletions

View File

@ -222,12 +222,12 @@
};
let query = `userinfor=${encodeURIComponent(JSON.stringify(userinfor))}&timestamp=${Date.now()}`;
uni.setStorageSync('SHARELINK', 'http://10.210.254.176:8090'+'/privilege/pages/restaurant/home/shop_home/shop_home?'+query);
uni.setStorageSync('SHARELINK', HTTP_REQUEST_URL +'/privilege/pages/restaurant/home/shop_home/shop_home?'+query);
// url
// const url = new URL(window.location.href);
// url.search = ''; //
// window.history.replaceState(null, '', url.href);
const url = new URL(window.location.href);
url.search = ''; //
window.history.replaceState(null, '', url.href);
}
},

View File

@ -1,3 +1,3 @@
module.exports = {
HTTP_REQUEST_URL: 'https://point.agrimedia.cn',
HTTP_REQUEST_URL: window.location.protocol + "//" + window.location.host,
}

View File

@ -132,10 +132,10 @@ class Request {
if (infor['data']['status'] != 200 && infor['data']['code'] != 7777) {
// #ifdef H5
if (infor['data']['status'] == 110002) {
window.location.href = `${HTTP_REQUEST_URL}/JXH5/pages/users/h5_login/index&redirect_uri=${window.location.protocol + "//" + window.location.host}/privilege/pages/restaurant/home/shop_home/shop_home`;
window.location.href = `${HTTP_REQUEST_URL}/JXH5/pages/users/h5_login/index?redirectUri=${window.location.protocol + "//" + window.location.host}/privilege/pages/restaurant/home/shop_home/shop_home`;
// window.location.href = `http://10.210.254.176:8081/JXH5/#/pages/users/h5_login/index?redirectUri=${window.location.protocol + "//" + window.location.host}/privilege/pages/restaurant/home/shop_home/shop_home`;
}
// #endif
if (infor['data']['msg'] == '产品错误' || infor['data']['msg'] == '产品不存在') {
uni.showToast({
title: '当前餐品不可用',