chore: update commnents
This commit is contained in:
+1
-1
@@ -1,8 +1,8 @@
|
||||
// const BASE_URL = `${location.origin}/api`;
|
||||
// const BASE_URL = `https://dev.voce.chat/api`;
|
||||
const BASE_URL = process.env.REACT_APP_RELEASE
|
||||
? `${location.origin}/api`
|
||||
: `https://dev.voce.chat/api`;
|
||||
// const BASE_URL = `https://dev.voce.chat/api`;
|
||||
export const CACHE_VERSION = `0.3.1`;
|
||||
export const ContentTypes = {
|
||||
text: "text/plain",
|
||||
|
||||
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user