From aea01e4025a42aff4b7cc0e3e7336f37bcd1ef99 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Sun, 21 Dec 2025 15:55:39 +0800 Subject: [PATCH] =?UTF-8?q?feat=EF=BC=9A=E3=80=90system=E3=80=91=E5=9C=B0?= =?UTF-8?q?=E5=8C=BA=E7=AE=A1=E7=90=86=EF=BC=9A100%?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/system/area/index.ts | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 src/api/system/area/index.ts diff --git a/src/api/system/area/index.ts b/src/api/system/area/index.ts new file mode 100644 index 0000000..3193d27 --- /dev/null +++ b/src/api/system/area/index.ts @@ -0,0 +1,19 @@ +import { http } from '@/http/http' + +/** 地区信息 */ +export interface Area { + id: number + name: string + parentId?: number + children?: Area[] +} + +/** 获得地区树 */ +export function getAreaTree() { + return http.get('/system/area/tree') +} + +/** 获得 IP 对应的地区名 */ +export function getAreaByIp(ip: string) { + return http.get(`/system/area/get-by-ip?ip=${ip}`) +}