From 4d033e59f17eda81d10718500f203000fa91aac8 Mon Sep 17 00:00:00 2001 From: paulGao Date: Tue, 4 Jan 2022 14:22:00 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=88=B7=E6=96=B0token?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3=E5=A4=B1=E6=95=88=E7=9A=84=E6=83=85=E5=86=B5?= =?UTF-8?q?=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- utils/request.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/utils/request.js b/utils/request.js index fdfc956..b6dc4a7 100644 --- a/utils/request.js +++ b/utils/request.js @@ -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) ||