From 340d40b4d4243c0f3bf82d40b8f570246e39119d Mon Sep 17 00:00:00 2001 From: wujingjing <gersonwu@qq.com> Date: 星期四, 28 十一月 2024 14:28:34 +0800 Subject: [PATCH] 对接地图指标 --- src/utils/request.ts | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/utils/request.ts b/src/utils/request.ts index 666feaf..dd0ad55 100644 --- a/src/utils/request.ts +++ b/src/utils/request.ts @@ -8,6 +8,7 @@ import { debounce, decodeFormData } from './util'; import { AUTH_URL, MAIN_URL, SECONDARY_URL } from '/@/constants'; import { Local, LoginInfo, Session } from '/@/utils/storage'; +import { isSharePage } from '../stores/chatRoom'; // import JSONbig from 'json-bigint'; //#region ====================== 鍚庣 res.err_code ====================== @@ -48,7 +49,7 @@ // 灏� token 娣诲姞鍒拌姹傛姤鏂囧ご涓� config.headers['hswatersession'] = accessSession; } - if (!NO_AUTH_API_LIST.includes(config.url)) { + if (!NO_AUTH_API_LIST.includes(config.url) && !isSharePage.value) { if (!accessSession && config.url !== LOGIN_URL && config.url !== TEL_LOGIN_URL) { handleNoAuth(config.url); throw '鏉冮檺楠岃瘉澶辫触'; @@ -88,7 +89,7 @@ if (!serveData.json_ok) { switch (serveData?.err_code) { case ErrorCode.Auth: - if (res.config.url !== LOGIN_URL && res.config.url !== TEL_LOGIN_URL) { + if (res.config.url !== LOGIN_URL && res.config.url !== TEL_LOGIN_URL && !isSharePage.value) { handleNoAuth(); throw '鏉冮檺楠岃瘉澶辫触'; } @@ -140,7 +141,6 @@ }; const service = createAxiosInstance(); - export const mainRequest = service; //#region ====================== 娴佸搷搴旀暟鎹� ====================== -- Gitblit v1.9.3