diff --git a/src/api/jingdong.ts b/src/api/jingdong.ts index e939e20..9fbfa7d 100644 --- a/src/api/jingdong.ts +++ b/src/api/jingdong.ts @@ -115,6 +115,8 @@ export interface ImageGenSubmitInput { pose_id?: number /** 效果图编辑 edit;原图编辑 / 普通立即生成 generate */ mode?: 'generate' | 'edit' + /** 主体数量文案,来自 orders/stat.subject_name,如「1人」「2人+1宠物」 */ + subject_name?: string } export interface ImageGenImage { @@ -774,6 +776,7 @@ export const submitImageGen = (input: ImageGenSubmitInput) => { proportion_id: input.proportion_id ?? 0, pose_id: input.pose_id ?? 0, mode: input.mode || 'generate', + subject_name: input.subject_name || '', }, }) as Promise } diff --git a/src/views/jingdong/index.vue b/src/views/jingdong/index.vue index eec5696..2d580d0 100644 --- a/src/views/jingdong/index.vue +++ b/src/views/jingdong/index.vue @@ -801,6 +801,10 @@ async function startGenerate(opts: { n: 1, mode: opts.mode, scene_prop: sceneProp, + // 主体数量:沿用 orders/stat.subject_name + subject_name: + subjectNameFromStat.value || + String(orderStat.value?.subject_name || '').trim(), }) let taskId = task.task_id if (!taskId) throw new Error('提交生成失败')