mirror of
https://gitee.com/beijing_hongye_huicheng/lilishop-uniapp.git
synced 2025-12-17 16:05:53 +08:00
增加刷新token接口失效的情况处理
This commit is contained in:
@@ -107,6 +107,11 @@ http.interceptors.response.use(
|
|||||||
async (response) => {
|
async (response) => {
|
||||||
/* 请求之后拦截器。可以使用async await 做异步操作 */
|
/* 请求之后拦截器。可以使用async await 做异步操作 */
|
||||||
// token存在并且token过期
|
// token存在并且token过期
|
||||||
|
if (isRefreshing && response.statusCode === 403) {
|
||||||
|
cleanStorage();
|
||||||
|
isRefreshing = false;
|
||||||
|
}
|
||||||
|
|
||||||
let token = storage.getAccessToken();
|
let token = storage.getAccessToken();
|
||||||
if (
|
if (
|
||||||
(token && response.statusCode === 403) ||
|
(token && response.statusCode === 403) ||
|
||||||
|
|||||||
Reference in New Issue
Block a user