城市合伙人端开店城市屁默认郑州
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user