From 80c0aa2a864071ad77d6c7de7c508348b2eb2fee Mon Sep 17 00:00:00 2001
From: MrShi <1878285526@qq.com>
Date: 星期六, 25 四月 2026 14:46:20 +0800
Subject: [PATCH] app
---
app/utils/http.interceptor.js | 11 +++++++----
1 files changed, 7 insertions(+), 4 deletions(-)
diff --git a/app/utils/http.interceptor.js b/app/utils/http.interceptor.js
index 363abcb..ecd04a2 100644
--- a/app/utils/http.interceptor.js
+++ b/app/utils/http.interceptor.js
@@ -13,11 +13,13 @@
// 鍝嶅簲鎷︽埅鍣�
uni.$u.http.interceptors.response.use((response) => {
- if (response.data.code === 5113) {
- uni.navigateTo({
+ // console.log(response)
+ // 鏈櫥褰�/鐧诲綍杩囨湡
+ if ([5112, 5113].includes(response.data.code)) {
+ vm.$store.commit('clearAll')
+ uni.reLaunch({
url: '/pages/login/login'
- });
- return
+ })
}
if (response.data.code !== 200) {
uni.showToast({
@@ -26,6 +28,7 @@
duration: 2000
});
}
+ // console.log(response.data)
return response.data
}, (response) => {
return Promise.reject(response)
--
Gitblit v1.9.3