mirror of
https://gitee.com/bootx/dax-pay-ui.git
synced 2025-09-02 02:24:29 +00:00
feat 行政区划接口
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "bootx-platform-vue3",
|
||||
"version": "1.1.3",
|
||||
"version": "1.x",
|
||||
"author": {
|
||||
"name": "xxm"
|
||||
},
|
||||
@@ -46,7 +46,6 @@
|
||||
"ant-design-vue": "^3.2.15",
|
||||
"axios": "^0.26.1",
|
||||
"bpmn-js": "^10.3.0",
|
||||
"china-area-data": "^5.0.1",
|
||||
"codemirror": "^5.65.3",
|
||||
"cron-parser": "^4.6.0",
|
||||
"cropperjs": "^1.5.12",
|
||||
|
44
src/api/common/ChinaRegion.api.ts
Normal file
44
src/api/common/ChinaRegion.api.ts
Normal file
@@ -0,0 +1,44 @@
|
||||
import { defHttp } from '/@/utils/http/axios'
|
||||
import { Result } from '/#/axios'
|
||||
|
||||
/**
|
||||
* 获取一级行政区
|
||||
*/
|
||||
export function findAllProvince() {
|
||||
return defHttp.get<Result<Region[]>>({
|
||||
url: '/china/region/findAllProvince',
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取省市二级联动列表
|
||||
*/
|
||||
export function findAllProvinceAndCity() {
|
||||
return defHttp.get<Result<Region[]>>({
|
||||
url: '/china/region/findAllProvinceAndCity',
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取省市三级联动列表
|
||||
*/
|
||||
export function findAllProvinceAndCityAndArea() {
|
||||
return defHttp.get<Result<Region[]>>({
|
||||
url: '/china/region/findAllProvinceAndCityAndArea',
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 区域表
|
||||
*/
|
||||
export interface Region {
|
||||
// 区划id
|
||||
id?: number
|
||||
// 区域名称
|
||||
name?: string
|
||||
// 上级区划id
|
||||
pid?: number
|
||||
// 区划级别
|
||||
level?: 1 | 2 | 3 | 4
|
||||
children?: Region[]
|
||||
}
|
Reference in New Issue
Block a user