From 5430330eaff5b72e6d91b32bba68c30a66f3f959 Mon Sep 17 00:00:00 2001 From: wuhongjian Date: Thu, 23 Jun 2022 15:02:11 +0800 Subject: [PATCH] =?UTF-8?q?BUG=20=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- front/src/utils/request.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/front/src/utils/request.js b/front/src/utils/request.js index ed1a4e87..3a642879 100644 --- a/front/src/utils/request.js +++ b/front/src/utils/request.js @@ -109,7 +109,7 @@ instance.interceptors.response.use( } } console.log('已清除') - location.reload() + router.push({ path: '/login' }) } response['Access-Control-Expose-Headers'] = 'redirect' const { code, message } = response.data @@ -170,7 +170,7 @@ instance.interceptors.response.use( } } console.log('已清除') - location.reload() + router.push({ path: '/login' }) } if (response.headers.redirect) { window.location.href = response.headers.redirect