refactor: 修复登录401不弹报错

This commit is contained in:
RubyLiu 2023-09-19 18:43:32 +08:00 committed by fit2-zhao
parent 50fed7ada7
commit 8fd6d79a8b
1 changed files with 1 additions and 1 deletions

View File

@ -12,10 +12,10 @@ export default function checkStatus(status: number, msg: string, errorMessageMod
errMessage = `${msg}`; errMessage = `${msg}`;
break; break;
case 401: { case 401: {
errMessage = msg || t('api.errMsg401');
if (!isLoginPage()) { if (!isLoginPage()) {
// 不是登录页再调用logout // 不是登录页再调用logout
logout(); logout();
errMessage = msg || t('api.errMsg401');
} }
break; break;
} }