refactor: 页面提示改为用户可理解的制作文案

This commit is contained in:
GouJ committed 2026-09-26 21:12:01 +08:00
1 parent e66c848134
commit 9da1e09b29
1 file changed
+3 -3
@@ -54,7 +54,7 @@ export function useSubjectImages() {
} catch (error) { } catch (error) {
if (error instanceof ApiError && error.status === 404) if (error instanceof ApiError && error.status === 404)
throw new Error( throw new Error(
'后端尚未提供形态图库查询,请更新后端 dev 并重启服务(GET /projects/:id/subject-forms)。', '暂时无法读取形态图片,请稍后重试。',
{ cause: error } { cause: error }
) )
throw error throw error
@@ -106,7 +106,7 @@ export function useSubjectImages() {
result.subjectId !== form.subjectId || result.subjectId !== form.subjectId ||
!result.generationPrompt?.trim() !result.generationPrompt?.trim()
) )
throw new Error('接口未确认正式提示词已保存,请先刷新形态记录核对。') throw new Error('提示词保存结果未确认,请刷新后核对。')
}) })
await query.refresh() await query.refresh()
} }
@@ -140,7 +140,7 @@ export function useSubjectImages() {
const ok = await runOperation(projectId, `提交 ${form.subject.name} · ${form.name} 图片生成`, async () => { const ok = await runOperation(projectId, `提交 ${form.subject.name} · ${form.name} 图片生成`, async () => {
const image = await subjectImagesApi.generate(formId, input) const image = await subjectImagesApi.generate(formId, input)
if (!image || image.subjectFormId !== formId || !['pending', 'generating'].includes(image.status)) if (!image || image.subjectFormId !== formId || !['pending', 'generating'].includes(image.status))
throw new Error(image?.error || '接口未返回有效的形态图片生成任务,请刷新图片记录核对。') throw new Error(image?.error || '图片生成任务未成功创建,请刷新后重试。')
}) })
if (ok) { if (ok) {
await query.refresh() await query.refresh()