code=401时request方法没有返回Promise.reject 修复

This commit is contained in:
严俊东 2021-07-20 04:49:22 +00:00 committed by Gitee
parent b616a2f2e7
commit cdace51197

View File

@ -64,6 +64,7 @@ service.interceptors.response.use(res => {
location.href = '/index'; location.href = '/index';
}) })
}).catch(() => {}); }).catch(() => {});
return Promise.reject('error')
} else if (code === 500) { } else if (code === 500) {
Message({ Message({
message: msg, message: msg,