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'))