feat: 生图增加商品尺寸填报
This commit is contained in:
@@ -32,7 +32,10 @@ export interface PlanItem {
|
||||
}
|
||||
|
||||
/** 默认方案:7 种基础类型各 1 张(AI 规划前) */
|
||||
export const DEFAULT_PLAN: PlanItem[] = SUITE_TYPE_OPTIONS.slice(0, 7).map((t) => ({
|
||||
export const DEFAULT_PLAN: PlanItem[] = SUITE_TYPE_OPTIONS
|
||||
.filter((t) => t.value !== 'multi_scene')
|
||||
.slice(0, 7)
|
||||
.map((t) => ({
|
||||
kind: t.value,
|
||||
title: t.label,
|
||||
detail: '',
|
||||
@@ -41,6 +44,14 @@ export const DEFAULT_PLAN: PlanItem[] = SUITE_TYPE_OPTIONS.slice(0, 7).map((t) =
|
||||
variant_name: null,
|
||||
}));
|
||||
|
||||
/** 商品外廓尺寸;单位可选 mm 或 cm。 */
|
||||
export interface ProductDimensions {
|
||||
length?: number;
|
||||
width?: number;
|
||||
height?: number;
|
||||
unit?: 'mm' | 'cm';
|
||||
}
|
||||
|
||||
/** 视觉风格(默认提示词可在页面上改写,随生成请求覆盖后端模板) */
|
||||
export const STYLE_SET_OPTIONS = [
|
||||
{ value: 1, label: '北欧极简', prompt: 'Nordic minimalism: light gray or warm off-white background, soft diffused light, low-saturation palette, generous negative space, restrained and clean composition' },
|
||||
@@ -100,6 +111,7 @@ export interface SuitePlanPayload {
|
||||
image_stats: Record<string, number>;
|
||||
platform: string;
|
||||
requirements?: string | null;
|
||||
dimensions?: ProductDimensions | null;
|
||||
}
|
||||
|
||||
export interface SuiteGeneratePayload {
|
||||
@@ -113,6 +125,7 @@ export interface SuiteGeneratePayload {
|
||||
platform: string;
|
||||
model?: string | null;
|
||||
watermark?: WatermarkPayload;
|
||||
dimensions?: ProductDimensions | null;
|
||||
}
|
||||
|
||||
export interface SuiteImageInfo {
|
||||
@@ -193,6 +206,9 @@ export interface ImageEditSinglePayload {
|
||||
after_asset_id?: string;
|
||||
/** 单张生成完成后由服务端合成水印;关闭时不传。 */
|
||||
watermark?: WatermarkPayload;
|
||||
/** 勾选时将当前图按尺寸标注图任务处理。 */
|
||||
generate_size_chart?: boolean;
|
||||
dimensions?: ProductDimensions | null;
|
||||
}
|
||||
|
||||
/** ★ 提交单张 AI 生图任务;通过 getSuite(suite_id) 查询进度。 */
|
||||
|
||||
Reference in New Issue
Block a user