fix: 修复登录超时后无限重定向问题

This commit is contained in:
chenjinsong
2021-08-27 11:24:51 +08:00
parent d1da718e2a
commit 4b5b6e5097
3 changed files with 2 additions and 3 deletions

View File

@@ -45,6 +45,7 @@ axios.interceptors.response.use(
window.location.href = '/'
} else if (response.status === 200) {
if (accountErrorCode.indexOf(response.data.code) !== -1) {
sessionStorage.removeItem(storageKey.token)
window.location.href = '/'
}
}