From 0bcf6a93f7b09d13cb79e18e8d4bb74018f09528 Mon Sep 17 00:00:00 2001 From: zzlgreat Date: Sun, 23 Nov 2025 12:21:19 +0800 Subject: [PATCH] update pay function --- src/views/Concept/ConceptTimelineModal.js | 501 ++++++++++------------ 1 file changed, 237 insertions(+), 264 deletions(-) diff --git a/src/views/Concept/ConceptTimelineModal.js b/src/views/Concept/ConceptTimelineModal.js index b876d28c..379a8a71 100644 --- a/src/views/Concept/ConceptTimelineModal.js +++ b/src/views/Concept/ConceptTimelineModal.js @@ -535,148 +535,283 @@ const ConceptTimelineModal = ({ ) : timelineData.length > 0 ? ( - - {/* 时间轴主线 */} - - - + + {timelineData.map((item, index) => { const priceInfo = getPriceInfo(item.price); const hasEvents = item.events.length > 0; const isExpanded = expandedDates[item.date]; + const isLeft = index % 2 === 0; // 偶数项在左,奇数项在右 return ( - {/* 左侧 - 涨跌幅信息 */} + {/* 内容区域 */} - - - {formatDateDisplay(item.date)} - - - {item.price && ( - + {/* 日期标签 */} + + - - {priceInfo.icon && ( - - )} - - {priceInfo.text} - - + {formatDateDisplay(item.date)} + - {item.price.stock_count && ( - - 统计股票: {item.price.stock_count} 只 - - )} - + {item.price && ( + + + {priceInfo.icon && ( + + )} + {priceInfo.text} + + + )} + + + {/* 股票数量 */} + {item.price && item.price.stock_count && ( + + 📊 统计股票: {item.price.stock_count} 只 + )} - {!item.price && !hasEvents && ( - - 当日无数据 + {/* 事件信息 */} + {hasEvents ? ( + + + + + + {item.events.map((event, eventIdx) => ( + + + + + {event.type === 'news' ? '新闻' : '研报'} + + {event.source && ( + {event.source} + )} + {event.publisher && ( + + {event.publisher} + + )} + {event.rating && ( + + {event.rating} + + )} + + + {event.title} + + + {event.content || '暂无内容'} + + + + + ))} + + + + ) : ( + + 📭 当日无相关资讯 )} - {/* 中间 - 时间轴节点 */} + {/* 时间轴节点 */} hasEvents && toggleDateExpand(item.date)} _hover={hasEvents ? { - transform: 'scale(1.2)', - bg: 'pink.500' + transform: 'scale(1.15)', + boxShadow: '0 6px 20px rgba(139, 92, 246, 0.4)' } : {}} - transition="all 0.2s" + transition="all 0.3s" + display="flex" + alignItems="center" + justifyContent="center" > {hasEvents && ( <> {item.events.length} - {/* 动画点击提示 */} )} - - {/* 右侧 - 事件信息 */} - - {hasEvents ? ( - - - - - - {item.events.map((event, eventIdx) => ( - - - - - {event.type === 'news' ? '新闻' : '研报'} - - {event.source && ( - - {event.source} - - )} - {event.publisher && ( - - {event.publisher} - - )} - {event.rating && ( - - {event.rating} - - )} - - - - {event.title} - - - - {event.content || '暂无内容'} - - - - - - ))} - - - - ) : ( - - 当日无相关资讯 - + {/* 连接线到下一个节点 */} + {index < timelineData.length - 1 && ( + )} - - {/* 分隔线 */} - {index < timelineData.length - 1 && ( - - )} ); })}