diff --git a/App.vue b/App.vue index 7eb9ac2..8878890 100644 --- a/App.vue +++ b/App.vue @@ -222,12 +222,12 @@ }; let query = `userinfor=${encodeURIComponent(JSON.stringify(userinfor))}×tamp=${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); } }, diff --git a/config/app.js b/config/app.js index 83ed9d4..d5324c4 100644 --- a/config/app.js +++ b/config/app.js @@ -1,3 +1,3 @@ module.exports = { - HTTP_REQUEST_URL: 'https://point.agrimedia.cn', + HTTP_REQUEST_URL: window.location.protocol + "//" + window.location.host, } diff --git a/request/request.js b/request/request.js index f6a4962..df36846 100644 --- a/request/request.js +++ b/request/request.js @@ -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: '当前餐品不可用',