From 9b7f634ad31936c29db4500f8d6af4af89e8f87d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=94=B2=E8=BE=B0=E7=94=9F=E4=BA=A7?= Date: Mon, 11 May 2026 21:31:23 +0800 Subject: [PATCH] =?UTF-8?q?v0.2.3=20-=20=E4=BF=AE=E5=A4=8D=E6=88=90?= =?UTF-8?q?=E4=BA=A4=E8=A1=8C=E6=83=85=E7=BB=9F=E8=AE=A1=E8=A1=A8=E6=A0=BC?= =?UTF-8?q?=E6=8E=92=E5=BA=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config/CHANGELOG.md | 7 +++++++ config/VERSION.json | 6 +++--- frontend/src/pages/News.jsx | 6 ++++++ 3 files changed, 16 insertions(+), 3 deletions(-) diff --git a/config/CHANGELOG.md b/config/CHANGELOG.md index 3c02f2b..cab3f1c 100644 --- a/config/CHANGELOG.md +++ b/config/CHANGELOG.md @@ -1,5 +1,12 @@ # 版本更新记录 +## v0.2.3 (2026-05-11) + +### 前端更新 +- **News.jsx** + - 修复:统计表格点击均价弹出的成交详情列表按成交日期倒序排序 + - 更新:calcAvg函数过滤后对items按deal_date排序 + ## v0.2.2 (2026-05-11) ### 后端更新 diff --git a/config/VERSION.json b/config/VERSION.json index bf39de9..cb4fda1 100644 --- a/config/VERSION.json +++ b/config/VERSION.json @@ -1,12 +1,12 @@ { - "version": "0.2.2", + "version": "0.2.3", "updated": "2026-05-11", "modules": { "frontend": { - "version": "0.1.9", + "version": "0.2.0", "pages": { "Add": "0.0.2", - "News": "0.1.0" + "News": "0.2.0" } }, "backend": { diff --git a/frontend/src/pages/News.jsx b/frontend/src/pages/News.jsx index 5686ed4..aeba8e9 100644 --- a/frontend/src/pages/News.jsx +++ b/frontend/src/pages/News.jsx @@ -588,6 +588,12 @@ export default function News() { return p === pkg && c === cat }) if (items.length === 0) return null + // 按成交日期倒序排序 + items.sort((a, b) => { + const dateA = a.deal_date || a.created_at?.split('T')[0] || '' + const dateB = b.deal_date || b.created_at?.split('T')[0] || '' + return dateB.localeCompare(dateA) + }) const sum = items.reduce((a, b) => a + (b.deal_price || 0), 0) return { avg: Math.round(sum / items.length), count: items.length, items } }