forked from natuka/web.puabadge.com
修改:京东提交生图的时候,再新增传一个竖提数量字段
This commit is contained in:
1 parent
1887e8b2b3
commit
ff30dbb6b4
2 files changed
+7
No files matched your search
@@ -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<ImageGenTask>
|
||||
}
|
||||
|
||||
@@ -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('提交生成失败')
|
||||
|
||||
Reference in new issue
Block a user