zhengyiming
6 天以前 b80dfac43870bb6991228fc01d32b3d5e428283d
apps/bMiniApp/src/utils/request/index.ts
@@ -10,6 +10,7 @@
/** 请求白名单,放置一些不需要token的接口(通过设置请求白名单,防止token过期后再请求造成的死循环问题) */
const whiteList = [RefreshTokenUrl];
const RefreshTokenBlackList = ['wxmpLogin'];
export function startLoading(showNavigationBarLoading: boolean) {
  if (showNavigationBarLoading) {
@@ -219,7 +220,10 @@
        const userStore = useUserStoreWithOut();
        if (response.headers['x-access-token']) {
        if (
          response.headers['x-access-token'] &&
          RefreshTokenBlackList.every((url) => !response.config.url?.includes(url))
        ) {
          const tokenInfo: API.LoginCommandCallback = {
            accessToken: response.headers['access-token'],
            refreshToken: response.headers['x-access-token'],