From cd17126df0b357a193e5684d3be3ba9f056350c7 Mon Sep 17 00:00:00 2001 From: duan Date: Thu, 11 Aug 2022 18:34:52 +0800 Subject: [PATCH] =?UTF-8?q?refactor(src/utils/request.js):=20=E4=BC=98?= =?UTF-8?q?=E5=8C=96=E6=8B=A6=E6=88=AA=E6=93=8D=E4=BD=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/utils/request.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/utils/request.js b/src/utils/request.js index e10e125..b7bf81c 100644 --- a/src/utils/request.js +++ b/src/utils/request.js @@ -69,9 +69,7 @@ service.interceptors.response.use( cancelButtonText: '取消', type: 'warning' }).then(() => { - store.dispatch('user/resetToken').then(() => { - location.reload() - }) + store.commit('user/RESET_STATE') }) } return Promise.reject(new Error(res.msg || 'Error'))