chore: update commnents

This commit is contained in:
Tristan Yang
2022-08-01 23:25:22 +08:00
parent c12b94742a
commit bba42f2f45
6 changed files with 56 additions and 13 deletions
+1
View File
@@ -45,6 +45,7 @@ const baseQueryWithTokenCheck = async (args, api, extraOptions) => {
// 先检查token是否过期,过期则renew
const { token, refreshToken, expireTime = +new Date() } = api.getState().authData;
let result = null;
console.log("base check", whiteList.includes(api.endpoint), api.endpoint);
if (!whiteList.includes(api.endpoint) && dayjs().isAfter(new Date(expireTime - 20 * 1000))) {
// 快过期了,renew
waitingForRenew = baseQuery(