fix: 明确选角候选生成完成状态

This commit is contained in:
GouJ committed 2026-09-24 22:34:15 +08:00
1 parent 5d7bc7f523
commit cec8aaafd6
1 file changed
+5 -2
@@ -285,12 +285,15 @@ export function useSubjectIdentity() {
if (!canGenerateCandidate.value || !subject.value || !identity.value) return
const id = subject.value.id
const identityId = identity.value.id
await runOperation(projectId.value, `生成 ${subject.value.name} 选角候选`, async () => {
const ok = await runOperation(projectId.value, `生成 ${subject.value.name} 选角候选`, async () => {
const image = await subjectIdentityApi.generateCastingCandidate(id, input)
if (!image || image.identityId !== identityId || image.status !== 'completed' || !image.imageUrl)
throw new Error(image?.error || '后端未返回已完成的选角候选,请刷新核对。')
})
await Promise.all([detail.refresh(), castingQuery.refresh()])
if (ok) {
await Promise.all([detail.refresh(), castingQuery.refresh(), catalog.refresh()])
operation.value.notice = `${subject.value.name} 选角候选已生成,请在下方候选图中确认正式演员。`
}
}
/** 候选切换母版只允许成功的 primary 图,不能将辅助视角直接升级为母版。 */