From 85da5fd33fa91cabac18d4c64dbb682b5effa6ec Mon Sep 17 00:00:00 2001 From: liruiqiang <3151805288@qq.com> Date: Mon, 8 Dec 2025 15:21:26 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E7=8A=B6=E6=80=81=E7=A0=81?= =?UTF-8?q?=E8=B7=B3=E8=BD=AC=E5=88=B0=E7=99=BB=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/utils/myAxios.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/utils/myAxios.js b/src/utils/myAxios.js index 0b020e7..499164e 100644 --- a/src/utils/myAxios.js +++ b/src/utils/myAxios.js @@ -42,6 +42,7 @@ myAxios.interceptors.response.use( // 假设后端接口规范:成功时 code=200,其他为错误 if (res.code !== 200) { if( res.code == 401){ + localStorage.removeItem('token'); router.push('/login') } // 错误提示(根据后端消息提示,或自定义)