fix: 嵌入式请求前缀

This commit is contained in:
fit2cloud-chenyw 2024-02-20 12:03:03 +08:00
parent e3e50c683a
commit 823ce0de6e

View File

@ -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 {
<T = any, R = AxiosResponse<T>, D = any>(