From 7ca6601325f0c75d7242aaef150d366c529ed8ec Mon Sep 17 00:00:00 2001 From: zzlgreat Date: Fri, 5 Dec 2025 16:57:04 +0800 Subject: [PATCH] update pay ui --- src/views/Concept/index.js | 80 +++++++++++++++++++++++++++++--------- 1 file changed, 62 insertions(+), 18 deletions(-) diff --git a/src/views/Concept/index.js b/src/views/Concept/index.js index 14dc571d..3eb83038 100644 --- a/src/views/Concept/index.js +++ b/src/views/Concept/index.js @@ -752,6 +752,15 @@ const ConceptCenter = () => { return `https://valuefrontier.cn/company?scode=${seccode}`; }; + // 获取最新爆发日期(从 outbreak_dates 数组中取最新的) + const getLatestOutbreakDate = (concept) => { + const dates = concept.outbreak_dates; + if (!dates || dates.length === 0) return null; + // 排序获取最新日期 + const sortedDates = [...dates].sort((a, b) => new Date(b) - new Date(a)); + return sortedDates[0]; + }; + // 格式化添加日期显示 const formatAddedDate = (concept) => { // 优先使用 created_at 或 added_date 字段 @@ -1066,15 +1075,33 @@ const ConceptCenter = () => { - {/* 添加日期 - 深色主题适配 */} - {concept.created_at || concept.added_date || concept.happened_times?.[0] ? ( - - - - 添加于 {new Date(concept.created_at || concept.added_date || concept.happened_times?.[0]).toLocaleDateString('zh-CN')} - - - ) : } + {/* 日期显示 - 根据排序方式显示爆发日期或添加日期 */} + {(() => { + const latestOutbreak = getLatestOutbreakDate(concept); + const addedDate = concept.created_at || concept.added_date || concept.happened_times?.[0]; + + // 优先显示爆发日期(如果存在) + if (latestOutbreak) { + return ( + + + + 爆发于 {new Date(latestOutbreak).toLocaleDateString('zh-CN')} + + + ); + } else if (addedDate) { + return ( + + + + 添加于 {new Date(addedDate).toLocaleDateString('zh-CN')} + + + ); + } + return ; + })()}