|  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** 请求白名单,放置一些不需要token的接口(通过设置请求白名单,防止token过期后再请求造成的死循环问题) */ | 
|---|
|  |  |  | const whiteList = [RefreshTokenUrl]; | 
|---|
|  |  |  | const RefreshTokenBlackList = ['wxmpLogin']; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | export function startLoading(showNavigationBarLoading: boolean) { | 
|---|
|  |  |  | if (showNavigationBarLoading) { | 
|---|
|  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | 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'], | 
|---|