增加刷新token接口失效的情况处理

master
paulGao 2022-01-04 14:22:00 +08:00
parent a80c579d8a
commit 4d033e59f1
1 changed files with 5 additions and 0 deletions

View File

@ -107,6 +107,11 @@ http.interceptors.response.use(
async (response) => {
/* 请求之后拦截器。可以使用async await 做异步操作 */
// token存在并且token过期
if (isRefreshing && response.statusCode === 403) {
cleanStorage();
isRefreshing = false;
}
let token = storage.getAccessToken();
if (
(token && response.statusCode === 403) ||