AI创作批量生成任务 V4 修复客户端AI创作排序BUG

This commit is contained in:
2026-07-15 13:30:59 +08:00
parent 7d9c50a74d
commit 51673453d8
4 changed files with 4 additions and 4 deletions
+1 -1
View File
@@ -347,7 +347,7 @@ async def list_tasks(
# 同一个 API 同时服务管理后台和客户端:
# - 管理员保持数据库倒序,最新记录在列表上方;
# - 普通用户先查询最新一页,再仅反转当前页,聊天消息从旧到新排列。
items_for_output = items if is_admin else sorted(items, key=lambda x: x.created_at if x.created_at is not None else x.id,reverse=False)
items_for_output = items if is_admin else list(reversed(items))
out_items = await build_task_out_list(
db,
items_for_output,
File diff suppressed because one or more lines are too long
+1 -1
View File
@@ -28,7 +28,7 @@
}
})();
</script>
<script type="module" crossorigin src="/assets/index-Buf7L1qs.js"></script>
<script type="module" crossorigin src="/assets/index-DN27BTjS.js"></script>
<link rel="stylesheet" crossorigin href="/assets/index-DviWdElm.css">
</head>
<body>
+1 -1
View File
@@ -753,7 +753,7 @@ const AIChatPage: React.FC = () => {
})
getgen_list(Pagebreak).then((data: any) => {
// API 按创建时间倒序返回;对话区按时间正序展示,最新消息保持在底部。
const mess_list = [...(data.items || [])].reverse()
const mess_list = data.items
const total = data.total
setGen_list(mess_list)
setTotalnumber(total)