Files
tydata-admin/apps/web-antd/src/api/index.ts
2025-06-08 20:16:51 +08:00

38 lines
830 B
TypeScript

export * from './agent';
export * from './core';
export * from './notification';
export * from './order';
export * from './platform-user';
export * from './product-manage';
export * from './promotion';
export * from './system';
export interface ApiResponse<T = any> {
code: number;
data: T;
message: string;
}
export interface PageResult<T> {
items: T[];
total: number;
}
declare global {
interface Window {
$http: {
delete<T = any>(url: string, config?: any): Promise<ApiResponse<T>>;
get<T = any>(url: string, config?: any): Promise<ApiResponse<T>>;
post<T = any>(
url: string,
data?: any,
config?: any,
): Promise<ApiResponse<T>>;
put<T = any>(
url: string,
data?: any,
config?: any,
): Promise<ApiResponse<T>>;
};
}
}