From 55f0c9aa235280e13131c59b3934c3b3c5019c47 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=94=B2=E8=BE=B0=E7=94=9F=E4=BA=A7?= Date: Sat, 11 Apr 2026 19:47:22 +0800 Subject: [PATCH] =?UTF-8?q?=E6=88=90=E4=BA=A4=E8=A1=8C=E6=83=85=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2=E6=8C=89=E7=BB=B4=E5=BA=A6=E5=B1=95=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/pages/News.jsx | 42 +++++++++++++++++++++++++++++++++++-- 1 file changed, 40 insertions(+), 2 deletions(-) diff --git a/frontend/src/pages/News.jsx b/frontend/src/pages/News.jsx index d469195..892899e 100644 --- a/frontend/src/pages/News.jsx +++ b/frontend/src/pages/News.jsx @@ -482,9 +482,47 @@ export default function News() { ) : (
{infoList.map(item => { - // 成交行情 tab - 暂时不显示内容 + // 成交行情 tab - 按维度汇总展示 if (activeTab === 'deal') { - return null + // 从content中解析各个字段 + const content = item.content || '' + const categoryMatch = content.match(/分类:\s*(.+?)(?:\n|$)/) + const packagingMatch = content.match(/包装:\s*(.+?)(?:\n|$)/) + const platformMatch = content.match(/平台:\s*(.+?)(?:\n|$)/) + const sellerMatch = content.match(/出售者:\s*(.+?)(?:\n|$)/) + const dateMatch = content.match(/日期:\s*(.+?)(?:\n|$)/) + + const category = categoryMatch ? categoryMatch[1].trim() : item.category || '-' + const packaging = packagingMatch ? packagingMatch[1].trim() : item.packaging || '-' + const platform = platformMatch ? platformMatch[1].trim() : '-' + const seller = sellerMatch ? sellerMatch[1].trim() : '-' + const dealDate = dateMatch ? dateMatch[1].trim() : item.deal_date || '-' + + // 从冠字号判断版本(龙钞J0,马钞J1,蛇钞J3等) + const serial = item.title?.split('-')[0] || '' + let version = '其他' + if (serial.startsWith('J0')) version = '龙钞' + else if (serial.startsWith('J1')) version = '马钞' + else if (serial.startsWith('J3')) version = '蛇钞' + + return ( +
+
+
{item.title}
+
¥{item.deal_price?.toLocaleString()}
+
+
+ {version} + {packaging} + {category} + {platform} + {dealDate} +
+ {seller && seller !== '-' && ( +
出售者: {seller}
+ )} +
+ ) } // 解析正文中的号码特征和联系方式