feat: 完成前端业务闭环与后端联调

This commit is contained in:
2026-08-24 23:37:56 +08:00
parent c59e36f933
commit 9ad572907b
175 changed files with 10711 additions and 1740 deletions
-8
View File
@@ -1,4 +1,3 @@
import { hasRemoteConfig } from '@/utils/runtime-config.js'
import {
normalizeRegionCode,
normalizeRegionParentCode,
@@ -9,14 +8,8 @@ import {
requestStrict
} from './request-client.js'
const requireRemoteRegion = (label) => {
if (hasRemoteConfig()) return
throw createRequestError(`${label}读取需要真实服务,当前本地预览不会伪造结果`, 'REMOTE_READ_REQUIRED')
}
export const regionApi = {
async getRegionChildren(parentCode, requestOptions = {}) {
requireRemoteRegion('地区选择')
const regionChildren = await requestStrict({
url: '/genealogy/app/region/children',
method: 'GET',
@@ -28,7 +21,6 @@ export const regionApi = {
},
async getRegionPath(regionCode, requestOptions = {}) {
requireRemoteRegion('行政区划路径')
const regionPath = await requestStrict({
url: `/genealogy/app/region/path/${encodeURIComponent(normalizeRegionCode(regionCode))}`,
method: 'GET'