城市合伙人县区不做限制

This commit is contained in:
2026-07-22 23:06:51 +08:00
parent 8c4419e04e
commit fb530e2ff5
7 changed files with 47 additions and 37 deletions
+6
View File
@@ -106,6 +106,12 @@ export function districtCodeLabel(code: string): string {
return codeToText[code] || code;
}
/** 列表展示:区县码 → 中文名,顿号拼接 */
export function formatDistrictLabels(codes?: string[] | null): string {
if (!codes?.length) return '—';
return codes.map((c) => districtCodeLabel(String(c))).join('、');
}
export function parseRegionCodes(codes?: string[]): ParsedChinaRegion | null {
if (!codes || codes.length < 3) return null;
const [provinceCode, cityCode, districtCode] = codes;