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
+10 -3
View File
@@ -1193,12 +1193,19 @@ export default function Chapters() {
</Tag>
);
case 'running':
case 'running': {
// 检查是否正在重试(后端会在error_message中包含"重试"信息)
const isRetrying = task.error_message && task.error_message.includes('重试');
return (
<Tag icon={<SyncOutlined spin />} color="processing">
{task.progress}%
<Tag
icon={<SyncOutlined spin />}
color={isRetrying ? "warning" : "processing"}
title={task.error_message || undefined}
>
{isRetrying ? `重试中 ${task.progress}%` : `分析中 ${task.progress}%`}
</Tag>
);
}
case 'completed':
return (
<Tag icon={<CheckCircleOutlined />} color="success">