From 823ce0de6ef08b33f129f7faae80336b5f5c9b80 Mon Sep 17 00:00:00 2001 From: fit2cloud-chenyw Date: Tue, 20 Feb 2024 12:03:03 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=B5=8C=E5=85=A5=E5=BC=8F=E8=AF=B7?= =?UTF-8?q?=E6=B1=82=E5=89=8D=E7=BC=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/core-frontend/src/config/axios/service.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/core/core-frontend/src/config/axios/service.ts b/core/core-frontend/src/config/axios/service.ts index cad708a721..e5629e3e38 100644 --- a/core/core-frontend/src/config/axios/service.ts +++ b/core/core-frontend/src/config/axios/service.ts @@ -33,10 +33,11 @@ import { useCache } from '@/hooks/web/useCache' const { wsCache } = useCache() const embeddedStore = useEmbedded() +const basePath = import.meta.env.VITE_API_BASEPATH -export const PATH_URL = embeddedStore.baseUrl - ? embeddedStore?.baseUrl + 'de2api/' - : import.meta.env.VITE_API_BASEPATH +const embeddedBasePath = + basePath.startsWith('./') && basePath.length > 2 ? basePath.substring(2) : basePath +export const PATH_URL = embeddedStore.baseUrl ? embeddedStore?.baseUrl + embeddedBasePath : basePath export interface AxiosInstanceWithLoading extends AxiosInstance { , D = any>(