Files
timi-web/src/api/BaseAPI.ts
T
2026-04-02 16:52:48 +08:00

17 lines
375 B
TypeScript

import Network from "../utils/Network";
let serviceAxios: any | null = null;
function getServiceAxios(): any {
if (serviceAxios === null) {
serviceAxios = Network.axios;
}
return serviceAxios;
}
export const axios = new Proxy({} as any, {
get(_target: any, prop: string | symbol, receiver: any): any {
return Reflect.get(getServiceAxios(), prop, receiver);
}
});