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}`;
break;
case 401: {
errMessage = msg || t('api.errMsg401');
if (!isLoginPage()) {
// 不是登录页再调用logout
logout();
errMessage = msg || t('api.errMsg401');
}
break;
}