From 8f33b3ff31008aa21afb1bbee9278c4bd64536fe Mon Sep 17 00:00:00 2001 From: xingyuv Date: Mon, 20 Mar 2023 16:43:25 +0800 Subject: [PATCH] feat: area api --- src/api/system/area/index.ts | 11 +++++++++++ 1 file changed, 11 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 00000000..52fc9d9e --- /dev/null +++ b/src/api/system/area/index.ts @@ -0,0 +1,11 @@ +import { defHttp } from '@/utils/http/axios' + +// 获得地区树 +export const getAreaTree = () => { + return defHttp.get({ url: '/system/area/tree' }) +} + +// 获得 IP 对应的地区名 +export const getAreaByIp = (ip: string) => { + return defHttp.get({ url: '/system/area/get-by-ip?ip=' + ip }) +}