mirror of
https://github.com/chansee97/nova-admin.git
synced 2025-04-06 03:57:54 +08:00
15 lines
394 B
TypeScript
15 lines
394 B
TypeScript
import { createAlovaInstance } from './alova'
|
|
import { proxyConfig } from '@/../build/proxy'
|
|
|
|
const { url, urlPattern } = proxyConfig[import.meta.env.MODE]
|
|
|
|
const isHttpProxy = import.meta.env.VITE_HTTP_PROXY === 'Y' || false
|
|
|
|
export const alovaInstance = createAlovaInstance({
|
|
baseURL: isHttpProxy ? urlPattern : url,
|
|
})
|
|
|
|
export const blankInstance = createAlovaInstance({
|
|
baseURL: '',
|
|
})
|