From ad685ebb7a5af63cd00d2da6d2e540dd8049ac93 Mon Sep 17 00:00:00 2001
From: MrShi <1878285526@qq.com>
Date: 星期五, 18 四月 2025 16:15:26 +0800
Subject: [PATCH] 提交

---
 h5/utils/http.interceptor.js |   42 ++++++++++++++----------------------------
 1 files changed, 14 insertions(+), 28 deletions(-)

diff --git a/h5/utils/http.interceptor.js b/h5/utils/http.interceptor.js
index d109c15..ee462f4 100644
--- a/h5/utils/http.interceptor.js
+++ b/h5/utils/http.interceptor.js
@@ -26,35 +26,21 @@
 	uni.$u.http.interceptors.response.use((response) => {
 		uni.hideLoading();
 		// 鐧诲綍杩囨湡
-		if (response.data.code === 401) {
-			if (!isRefreshing) {	// 鏄惁宸茬粡鎵ц鍒锋柊
-				isRefreshing = true
-				uni.login({
-					provider: 'weixin',
-					success: async function (loginRes) {
-						let { code } = loginRes;
-						uni.request({
-							url: vm.$baseUrl + 'mobile/system/login',
-							method: "GET",
-							data: { code },
-							success: (res) => {
-								isRefreshing = false
-								vm.$store.commit('setToken', res.data.data)
-								// 宸茬粡鍒锋柊浜唗oken锛屽皢鎵�鏈夐槦鍒椾腑鐨勮姹傝繘琛岄噸璇�
-								requests.forEach(item => item(res.data.data))
-								requests = []
-							}
-						});
-					}
-				});
-			}
-			return new Promise((resolve) => {
-				// 灏唕esolve鏀捐繘闃熷垪锛岀敤涓�涓嚱鏁板舰寮忔潵淇濆瓨锛岀瓑token鍒锋柊鍚庣洿鎺ユ墽琛�
-				requests.push(token => {
-					response.config.header['eva-auth-token'] = token
-					resolve(uni.$u.http.request(response.config));
-				})
+		if (response.data.code === 5112) {
+			uni.showToast({
+				title: '鐧诲綍杩囨湡锛屾鍦ㄩ噸鏂拌烦杞巿鏉�',
+				duration: 2000,
+				success() {
+					setTimeout(() => {
+						let loc_href = encodeURIComponent("https://dmtest.ahapp.net/lianhelihua_web/")
+						let corpId = 'wweea8f71b54e3b835';
+						let agentId = '1000095';
+						let wxUrl = `https://open.weixin.qq.com/connect/oauth2/authorize?appid=${corpId}&redirect_uri=${loc_href}&response_type=code&scope=snsapi_base&state=#wechat_redirect`
+						location.href = wxUrl;
+					}, 1500)
+				}
 			})
+			return
 		}
 		if (response.data.code !== 200) {
 			uni.showToast({

--
Gitblit v1.9.3