From ac0f2d21a0008847d9a5d4b90dea17f94fbda555 Mon Sep 17 00:00:00 2001 From: liuminjian Date: Mon, 2 Aug 2021 16:51:28 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/utils/request.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/utils/request.js b/src/utils/request.js index 57031da1..64b40a7b 100644 --- a/src/utils/request.js +++ b/src/utils/request.js @@ -70,7 +70,13 @@ service.interceptors.response.use(res => { }) .then(() => { store.dispatch('LogOut').then(() => { - location.href = '/index'; + if ('/authenticRight/index'.indexOf(to.path) !== -1) { + location.href = '/authenticRight/login'; + } else if ('/homestead/index'.indexOf(to.path) !== -1) { + location.href = '/homestead/login'; + } else { + location.href = '/index'; + } }) }) } else if (code === 500) {