fix:修复章节分析页面状态同步问题

This commit is contained in:
xiamuceer-j
2026-01-24 12:39:14 +08:00
parent f29eb3d8dc
commit ceb52da1ef
4 changed files with 49 additions and 16 deletions
+6 -3
View File
@@ -363,12 +363,15 @@ export function useChapterSync() {
}
} else if (message.type === 'error') {
throw new Error(message.error || '生成失败');
} else if (message.type === 'done') {
// 生成完成,保存分析任务ID
analysisTaskId = message.analysis_task_id;
} else if (message.type === 'result') {
// 结果消息,包含分析任务ID
if (message.data?.analysis_task_id) {
analysisTaskId = message.data.analysis_task_id;
}
if (onProgressUpdate) {
onProgressUpdate('生成完成', 100);
}
} else if (message.type === 'done') {
// 生成完成,刷新章节数据
await refreshChapters();
} else if (message.type === 'analysis_started') {