fix(edit): 类目问题修改

This commit is contained in:
R524809
2026-09-11 10:36:25 +08:00
parent 05a00d46b9
commit 2c4e94ab3d
11 changed files with 869 additions and 79 deletions
+18
View File
@@ -147,6 +147,16 @@ export type ProductEditorSnapshot = {
list_price: string | null;
currency_code: string | null;
};
/** Ordered final image assets for this platform listing. Source URLs
* are preview-only evidence and are never used for publishing. */
media: Array<{
asset_id: string;
content_type: 'image/jpeg' | 'image/png' | 'image/webp';
byte_size: number;
width_px: number | null;
height_px: number | null;
source_url: string | null;
}>;
}>;
attributes: Array<{
id: string;
@@ -391,6 +401,14 @@ export const saveProductEditorDraftRequestSchema = z
physical_spec: variantPhysicalSpec,
package_spec: variantPackageSpec,
offer_id: nullableText(500),
media_asset_ids: z
.array(uuid)
.max(15)
.refine(
(ids) => new Set(ids).size === ids.length,
'SKU 图片不能重复',
)
.default([]),
})
.strict()
.superRefine((variant, context) => {