From bf6ec12b11e734c8f88017ae2c27b0abee2f70f3 Mon Sep 17 00:00:00 2001 From: whitechiina <1293616053@qq.com> Date: Fri, 19 Sep 2025 10:52:42 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E7=82=B9=E9=A4=90=E5=88=86=E4=BA=AB?= =?UTF-8?q?=E9=93=BE=E6=8E=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- App.vue | 8 ++++---- config/app.js | 2 +- request/request.js | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) 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: '当前餐品不可用',