forked from github/dataease
Merge pull request #8073 from dataease/pr@dev-v2@fix_embedded_axios
fix: 嵌入式请求前缀
This commit is contained in:
commit
072c582445
@ -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>(
|
||||
|
Loading…
Reference in New Issue
Block a user