You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
21 lines
460 B
21 lines
460 B
/**
|
|
* 该文件可自行根据业务逻辑进行调整
|
|
*/
|
|
|
|
import { useAppConfig } from '@vben/hooks';
|
|
import { RequestClient } from '@vben/request';
|
|
|
|
export * from './hooks';
|
|
export * from './types';
|
|
|
|
const { apiURL } = useAppConfig(import.meta.env, import.meta.env.PROD);
|
|
|
|
function createRequestClient(baseURL: string) {
|
|
const client = new RequestClient({
|
|
baseURL,
|
|
});
|
|
|
|
return client;
|
|
}
|
|
|
|
export const requestClient = createRequestClient(apiURL);
|
|
|