diff --git a/public/LOGO_badge.png b/public/LOGO_badge.png new file mode 100644 index 00000000..07b02708 Binary files /dev/null and b/public/LOGO_badge.png differ diff --git a/src/views/Concept/index.js b/src/views/Concept/index.js index 4d912700..5f132864 100644 --- a/src/views/Concept/index.js +++ b/src/views/Concept/index.js @@ -2,6 +2,7 @@ import React, { useState, useEffect, useCallback } from 'react'; import { useSearchParams, useNavigate } from 'react-router-dom'; import { logger } from '../../utils/logger'; import defaultEventImage from '../../assets/img/default-event.jpg'; +import companyLogo from '../../../public/LOGO_badge.png'; import { Box, Container, @@ -630,46 +631,20 @@ const ConceptCenter = () => { ); }; - // 格式化日期显示 - const formatHappenedTimes = (times) => { - if (!times || times.length === 0) return null; + // 格式化添加日期显示 + const formatAddedDate = (concept) => { + // 优先使用 created_at 或 added_date 字段 + const addedDate = concept.created_at || concept.added_date || concept.happened_times?.[0]; - if (times.length === 1) { - return ( - - - {new Date(times[0]).toLocaleDateString('zh-CN')} - - ); - } - - const sortedTimes = [...times].sort((a, b) => new Date(b) - new Date(a)); - const latestDate = new Date(sortedTimes[0]).toLocaleDateString('zh-CN'); + if (!addedDate) return null; return ( - - 历史爆发日期: - {sortedTimes.map((time, idx) => ( - - {new Date(time).toLocaleDateString('zh-CN')} - - ))} - - } - bg="purple.600" - color="white" - borderRadius="md" - p={3} - > - - - - {latestDate} (共{times.length}次) - - - + + + + 添加于 {new Date(addedDate).toLocaleDateString('zh-CN')} + + ); }; @@ -777,6 +752,25 @@ const ConceptCenter = () => { ))} + {/* 公司 Logo 层 */} + + Company Logo + + {/* 毛玻璃层 */} { bgGradient="linear(to-r, transparent, rgba(255,255,255,0.5), transparent)" /> + {/* 左上角涨跌幅 Badge */} + {hasChange && ( + 5 ? `${pulseAnimation} 2s infinite` : 'none'} + > + 0 ? FaArrowUp : changePercent < 0 ? FaArrowDown : null} + boxSize={3} + /> + {formatChangePercent(changePercent)} + + )} + {/* 右上角股票数量徽章 */} { - + {/* 概念名称 */} { {concept.description || '暂无描述信息'} - {/* 涨跌幅信息卡片 */} - {hasChange && concept.price_info?.trade_date && ( - 0 - ? "linear(to-r, rgba(139, 92, 246, 0.1), rgba(168, 85, 247, 0.05))" - : "linear(to-r, rgba(236, 72, 153, 0.1), rgba(251, 113, 133, 0.05))" - } - border="1px solid" - borderColor={changePercent > 0 ? "purple.200" : "pink.200"} - > - - - 0 ? "purple.500" : "pink.500"} - /> - - {new Date(concept.price_info.trade_date).toLocaleDateString('zh-CN')} - - - - 0 ? FaArrowUp : FaArrowDown} - boxSize={3} - color={changePercent > 0 ? "red.500" : "green.500"} - /> - 0 ? "red.500" : "green.500"} - > - {formatChangePercent(changePercent)} - - - - - )} - {concept.stocks && concept.stocks.length > 0 && ( { - {formatHappenedTimes(concept.happened_times)} + {formatAddedDate(concept)} - + {searchQuery && sortBy === '_score' && ( @@ -1535,6 +1524,7 @@ const ConceptCenter = () => { + {searchQuery && sortBy === '_score' && ( diff --git a/tailwind.config.js.v3-backup b/tailwind.config.js.v3-backup deleted file mode 100644 index 2a05091a..00000000 --- a/tailwind.config.js.v3-backup +++ /dev/null @@ -1,20 +0,0 @@ -/** @type {import('tailwindcss').Config} */ - -module.exports = { - // 只扫描 AgentChat 页面(唯一使用 Hero UI 的地方) - // 使用精确路径,避免误匹配 node_modules - content: [ - "./src/views/AgentChat/index.js", - "./src/providers/AppProviders.js", // HeroUIProvider - // HeroUI v3 不再需要扫描 node_modules,样式通过 CSS 导入加载 - ], - - darkMode: "class", - - theme: { - extend: {}, - }, - - // HeroUI v3 不再需要 plugins,样式通过 @import "@heroui/styles" 加载 - plugins: [], -}