From 3ed3fcc8d8d5a6512b0a01ce6f58305bc427f9ca Mon Sep 17 00:00:00 2001 From: Wangxin Date: Tue, 11 Nov 2025 22:40:40 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90web=E3=80=91=20=E7=99=BB=E5=BD=95?= =?UTF-8?q?=E5=A4=B1=E6=95=88=E8=B7=B3=E8=BD=AC=E5=A4=B1=E8=B4=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ALOps_sys_fe/alops-ui/src/utils/request.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ALOps_sys_fe/alops-ui/src/utils/request.js b/ALOps_sys_fe/alops-ui/src/utils/request.js index aa4947b7..1cb32e6e 100644 --- a/ALOps_sys_fe/alops-ui/src/utils/request.js +++ b/ALOps_sys_fe/alops-ui/src/utils/request.js @@ -88,7 +88,10 @@ service.interceptors.response.use(res => { MessageBox.confirm('登录状态已过期,您可以继续留在该页面,或者重新登录', '系统提示', { confirmButtonText: '重新登录', cancelButtonText: '取消', type: 'warning' }).then(() => { isRelogin.show = false store.dispatch('LogOut').then(() => { - location.href = '/index' + // 使用Vue Router进行跳转,确保正确导航到登录页面 + import('@/router').then(router => { + router.default.push('/login') + }) }) }).catch(() => { isRelogin.show = false