fix: 移除前端二次排序,使用后端排序结果

This commit is contained in:
Your Name 2026-01-29 12:18:41 +08:00
parent 186aef053b
commit d15a15a507

View File

@ -3434,12 +3434,8 @@ const loadTasks = async (forceReload = false) => {
allTasks = [...allTasks, ...items]
}
// 按创建时间排序
allTasks.sort((a, b) => {
const timeA = new Date(a.createTime || 0).getTime()
const timeB = new Date(b.createTime || 0).getTime()
return timeB - timeA // 降序
})
// 🔥 移除前端排序,使用后端排序结果(后端已按可抢单优先+时间排序)
// 如果需要时间排序,后端会根据 sortBy 参数处理
// 缓存所有数据
allAvailableTasks = allTasks