12 lines
428 B
JavaScript
12 lines
428 B
JavaScript
import { request, parseResponseJson } from '@/utils/request'
|
|
|
|
/** GET /api/mini/common/china-region-tree,数据来自 bas_china_region */
|
|
export async function fetchChinaRegionTree() {
|
|
const res = await request({ url: '/mini/common/china-region-tree', method: 'GET' })
|
|
const body = parseResponseJson(res)
|
|
if (body?.code === 200 && Array.isArray(body.data?.tree)) {
|
|
return body.data.tree
|
|
}
|
|
return []
|
|
}
|