From e378bb9e1ceb8c4620d046abd72c991ba0900955 Mon Sep 17 00:00:00 2001 From: caoqianming Date: Thu, 23 Apr 2026 13:40:29 +0800 Subject: [PATCH] =?UTF-8?q?fix:token=E5=A4=B1=E6=95=88=E6=97=B6=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3=E8=BF=94=E5=9B=9E401=E5=90=8E=E5=BC=BA=E5=88=B6?= =?UTF-8?q?=E8=B7=B3=E8=BD=AC=E7=99=BB=E5=BD=95=E9=A1=B5=EF=BC=8C=E9=81=BF?= =?UTF-8?q?=E5=85=8D=E5=81=9C=E7=95=99=E5=9C=A8=E7=A9=BA=E5=88=97=E8=A1=A8?= =?UTF-8?q?=E9=A1=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Opus 4.7 --- frontend/src/api/client.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/frontend/src/api/client.js b/frontend/src/api/client.js index 4ec2184..4bf5331 100644 --- a/frontend/src/api/client.js +++ b/frontend/src/api/client.js @@ -20,6 +20,9 @@ api.interceptors.response.use( if (error.response?.status === 401) { const { clearAuth } = useAuth() clearAuth() + if (window.location.pathname !== '/login') { + window.location.replace('/login') + } } return Promise.reject(error) }