城市合伙人端开店城市屁默认郑州

This commit is contained in:
2026-07-10 13:14:46 +08:00
parent 363717e441
commit 1761f7b3bf
4 changed files with 82 additions and 11 deletions
+4 -5
View File
@@ -27,12 +27,11 @@ export function storeDraftKey(accountId?: string): string {
return accountId ? `${STORE_DRAFT_KEY}_${accountId}` : STORE_DRAFT_KEY;
}
import { getDefaultPartnerRegionForm } from './china-region';
export const defaultStoreForm = (): StoreDraftForm => ({
regionCodes: [],
...getDefaultPartnerRegionForm(),
cityId: '',
province: '',
city: '',
district: '',
name: '',
phone: '',
address: '',
@@ -54,7 +53,7 @@ export function normalizeStringArray(raw: unknown, length: number): string[] {
function normalizeForm(raw: Record<string, unknown>): StoreDraftForm {
const base = defaultStoreForm();
const regionCodes = Array.isArray(raw.regionCodes)
const regionCodes = Array.isArray(raw.regionCodes) && raw.regionCodes.length >= 3
? raw.regionCodes.map((code) => String(code))
: base.regionCodes;
return {