feat: system and infra api

This commit is contained in:
xingyu4j
2025-05-09 14:40:00 +08:00
parent d88a5ff646
commit 6df5bd0060
43 changed files with 2749 additions and 0 deletions

View File

@@ -0,0 +1,24 @@
import { requestClient } from '#/api/request';
export namespace SystemAreaApi {
/** 地区信息 */
export interface Area {
id?: number;
name: string;
code: string;
parentId?: number;
sort?: number;
status?: number;
createTime?: Date;
}
}
/** 获得地区树 */
export function getAreaTree() {
return requestClient.get<SystemAreaApi.Area[]>('/system/area/tree');
}
/** 获得 IP 对应的地区名 */
export function getAreaByIp(ip: string) {
return requestClient.get<string>(`/system/area/get-by-ip?ip=${ip}`);
}