fix;提交代码子账号

This commit is contained in:
ljy
2026-07-09 23:52:00 +08:00
parent 336116fbf2
commit b32e2a06eb
17 changed files with 344 additions and 225 deletions
+7 -1
View File
@@ -41,7 +41,7 @@ export const defaultStoreForm = (): StoreDraftForm => ({
bankBranch: '',
});
function normalizeStringArray(raw: unknown, length: number): string[] {
export function normalizeStringArray(raw: unknown, length: number): string[] {
if (!Array.isArray(raw)) return Array.from({ length }, () => '');
const items = raw.map((item) => String(item ?? ''));
while (items.length < length) items.push('');
@@ -126,6 +126,12 @@ export function validateStoreStep2(
return null;
}
export function patchEnvPhotoAt(urls: string[], index: number, url: string): string[] {
const envPhotoUrls = normalizeStringArray(urls, 3);
envPhotoUrls[index] = url;
return envPhotoUrls;
}
export function validateStoreStep3(
form: Pick<StoreDraftForm, 'bankAccountName' | 'bankAccountNo' | 'bankBranch'>,
): string | null {