From b60c196f9e911449122633e691f822b1b6d44c50 Mon Sep 17 00:00:00 2001 From: zzlgreat Date: Fri, 5 Dec 2025 15:26:45 +0800 Subject: [PATCH] update pay ui --- src/components/TradeDatePicker/index.tsx | 51 +++++- src/views/Concept/index.js | 218 +++++++++++++++++++++-- 2 files changed, 244 insertions(+), 25 deletions(-) diff --git a/src/components/TradeDatePicker/index.tsx b/src/components/TradeDatePicker/index.tsx index 362093b5..a3df510e 100644 --- a/src/components/TradeDatePicker/index.tsx +++ b/src/components/TradeDatePicker/index.tsx @@ -29,6 +29,8 @@ export interface TradeDatePickerProps { inputWidth?: string | object; /** 是否显示标签图标 */ showIcon?: boolean; + /** 是否使用深色模式(强制覆盖 Chakra 颜色模式) */ + isDarkMode?: boolean; } /** @@ -47,15 +49,38 @@ const TradeDatePicker: React.FC = ({ label = '交易日期', inputWidth = { base: '100%', lg: '200px' }, showIcon = true, + isDarkMode = false, }) => { - // 颜色主题 - const labelColor = useColorModeValue('purple.700', 'purple.300'); - const iconColor = useColorModeValue('purple.500', 'purple.400'); - const inputBorderColor = useColorModeValue('purple.200', 'purple.600'); - const tipBg = useColorModeValue('blue.50', 'blue.900'); - const tipBorderColor = useColorModeValue('blue.200', 'blue.600'); - const tipTextColor = useColorModeValue('blue.600', 'blue.200'); - const tipIconColor = useColorModeValue('blue.500', 'blue.300'); + // 颜色主题 - 支持 isDarkMode 强制覆盖 + const defaultLabelColor = useColorModeValue('purple.700', 'purple.300'); + const defaultIconColor = useColorModeValue('purple.500', 'purple.400'); + const defaultInputBorderColor = useColorModeValue('purple.200', 'purple.600'); + const defaultTipBg = useColorModeValue('blue.50', 'blue.900'); + const defaultTipBorderColor = useColorModeValue('blue.200', 'blue.600'); + const defaultTipTextColor = useColorModeValue('blue.600', 'blue.200'); + const defaultTipIconColor = useColorModeValue('blue.500', 'blue.300'); + + // 深色模式专用颜色 + const darkModeColors = { + labelColor: 'white', + iconColor: 'cyan.400', + inputBorderColor: 'whiteAlpha.300', + inputBg: 'whiteAlpha.50', + inputColor: 'white', + tipBg: 'rgba(59, 130, 246, 0.15)', + tipBorderColor: 'blue.500', + tipTextColor: 'blue.200', + tipIconColor: 'blue.300', + }; + + // 根据 isDarkMode 选择颜色 + const labelColor = isDarkMode ? darkModeColors.labelColor : defaultLabelColor; + const iconColor = isDarkMode ? darkModeColors.iconColor : defaultIconColor; + const inputBorderColor = isDarkMode ? darkModeColors.inputBorderColor : defaultInputBorderColor; + const tipBg = isDarkMode ? darkModeColors.tipBg : defaultTipBg; + const tipBorderColor = isDarkMode ? darkModeColors.tipBorderColor : defaultTipBorderColor; + const tipTextColor = isDarkMode ? darkModeColors.tipTextColor : defaultTipTextColor; + const tipIconColor = isDarkMode ? darkModeColors.tipIconColor : defaultTipIconColor; // 使用默认日期初始化(仅在 value 为 null 且有 defaultDate 时) React.useEffect(() => { @@ -103,10 +128,18 @@ const TradeDatePicker: React.FC = ({ min={minDateStr} max={maxDateStr} width={inputWidth} - focusBorderColor="purple.500" + focusBorderColor="purple.400" borderColor={inputBorderColor} borderRadius="lg" fontWeight="medium" + bg={isDarkMode ? darkModeColors.inputBg : undefined} + color={isDarkMode ? darkModeColors.inputColor : undefined} + _hover={{ borderColor: isDarkMode ? 'purple.400' : 'purple.300' }} + sx={isDarkMode ? { + '&::-webkit-calendar-picker-indicator': { + filter: 'invert(1)', + }, + } : undefined} /> {/* 最新交易日期提示 */} diff --git a/src/views/Concept/index.js b/src/views/Concept/index.js index 06fe87d2..bef70f23 100644 --- a/src/views/Concept/index.js +++ b/src/views/Concept/index.js @@ -132,6 +132,168 @@ const pulseAnimation = keyframes` 100% { transform: scale(1); } `; +// K线流动动画 - 模拟股票走势 +const klineFlowAnimation = keyframes` + 0% { transform: translateX(-100%); } + 100% { transform: translateX(100%); } +`; + +// 网格扫描动画 +const gridScanAnimation = keyframes` + 0% { opacity: 0.3; transform: translateY(0); } + 50% { opacity: 0.6; transform: translateY(-20px); } + 100% { opacity: 0.3; transform: translateY(0); } +`; + +// 脉冲光点动画 +const pulseGlowAnimation = keyframes` + 0%, 100% { opacity: 0.4; transform: scale(1); } + 50% { opacity: 0.8; transform: scale(1.2); } +`; + +/** + * 金融数据流动背景组件 - 模拟K线走势 + */ +const FinanceFlowBackground = () => ( + + {/* 深色渐变底层 */} + + + {/* 网格线背景 */} + + + {/* K线流动效果 - 多条线 */} + {[...Array(6)].map((_, i) => ( + + + + ))} + + {/* 垂直扫描线 */} + + + + + {/* 脉冲光点 */} + {[ + { top: '20%', left: '15%', color: 'rgba(239, 68, 68, 0.6)', delay: '0s' }, + { top: '40%', left: '75%', color: 'rgba(34, 197, 94, 0.6)', delay: '1s' }, + { top: '60%', left: '30%', color: 'rgba(139, 92, 246, 0.6)', delay: '2s' }, + { top: '80%', left: '60%', color: 'rgba(6, 182, 212, 0.6)', delay: '3s' }, + { top: '30%', left: '90%', color: 'rgba(239, 68, 68, 0.5)', delay: '0.5s' }, + { top: '70%', left: '10%', color: 'rgba(34, 197, 94, 0.5)', delay: '1.5s' }, + ].map((dot, i) => ( + + ))} + + {/* 顶部渐变遮罩 */} + + + {/* 底部渐变遮罩 */} + + +); + const ConceptCenter = () => { const [searchParams, setSearchParams] = useSearchParams(); const navigate = useNavigate(); @@ -1189,53 +1351,73 @@ const ConceptCenter = () => { isDarkMode={true} /> - {/* 快捷按钮 - 深色主题 */} - + {/* 快捷按钮 - 深色主题,更有区分度 */} + @@ -1245,7 +1427,10 @@ const ConceptCenter = () => { ); return ( - + + {/* 金融数据流动动画背景 */} + + {/* 导航栏已由 MainLayout 提供 */} {/* Hero Section - 精简版 */} @@ -1254,6 +1439,7 @@ const ConceptCenter = () => { bgGradient="linear(135deg, #0f0c29 0%, #302b63 50%, #24243e 100%)" color="white" overflow="hidden" + zIndex={1} > {/* 科幻网格背景 */} { {/* 主内容区域 - 深色主题 */} - +