2023-03-18 21:45:58 +08:00
|
|
|
import request from '@/config/axios'
|
|
|
|
|
|
|
|
// 获得地区树
|
2023-05-22 23:10:22 +08:00
|
|
|
export const getAreaTree = async () => {
|
|
|
|
return await request.get({ url: '/system/area/tree' })
|
|
|
|
}
|
|
|
|
|
|
|
|
export const getChildrenArea = async (id: number) => {
|
|
|
|
return await request.get({ url: '/system/area/getChildrenArea?id=' + id })
|
|
|
|
}
|
|
|
|
|
|
|
|
export const getAreaListByIds = async (data) => {
|
|
|
|
return await request.post({ url: '/system/area/list', data })
|
2023-03-18 21:45:58 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
// 获得 IP 对应的地区名
|
2023-03-18 22:29:08 +08:00
|
|
|
export const getAreaByIp = async (ip: string) => {
|
2023-03-18 21:45:58 +08:00
|
|
|
return await request.get({ url: '/system/area/get-by-ip?ip=' + ip })
|
|
|
|
}
|