feat: 按发布时间倒序排列AI推荐结果
This commit is contained in:
@@ -144,6 +144,13 @@ ${JSON.stringify(bids.map(b => b.title), null, 2)}`;
|
||||
});
|
||||
}
|
||||
|
||||
// 按发布时间倒序排列
|
||||
result.sort((a, b) => {
|
||||
if (!a.publishDate) return 1;
|
||||
if (!b.publishDate) return -1;
|
||||
return new Date(b.publishDate).getTime() - new Date(a.publishDate).getTime();
|
||||
});
|
||||
|
||||
return result;
|
||||
} catch (error) {
|
||||
this.logger.error('获取最新 AI 推荐失败:', error);
|
||||
|
||||
Reference in New Issue
Block a user