401 login

This commit is contained in:
q4speed 2020-04-09 17:41:37 +08:00
parent bccd0cc317
commit e82c57e826
1 changed files with 4 additions and 0 deletions

View File

@ -46,6 +46,10 @@ export default {
}
function exception(error, result) {
if (error.response && error.response.status === 401) {
login();
return;
}
result.loading = false;
window.console.error(error.response || error.message);
if (error.response.data) {