feat: area api

pull/1/MERGE
xingyuv 2023-03-20 16:43:25 +08:00
parent 97c1f832dd
commit 8f33b3ff31
1 changed files with 11 additions and 0 deletions

View File

@ -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 })
}