From 955e0db740a19330edd4cd092cb93690f31c129f Mon Sep 17 00:00:00 2001
From: zdl <3489966805@qq.com>
Date: Tue, 21 Oct 2025 15:43:59 +0800
Subject: [PATCH] =?UTF-8?q?feat:=20=E9=A6=96=E9=A1=B5UI=E8=B0=83=E6=95=B4?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/views/Home/HomePage.js | 257 +++++++++++++++++++++++--------------
1 file changed, 160 insertions(+), 97 deletions(-)
diff --git a/src/views/Home/HomePage.js b/src/views/Home/HomePage.js
index dbb8e462..957149e5 100755
--- a/src/views/Home/HomePage.js
+++ b/src/views/Home/HomePage.js
@@ -1,19 +1,20 @@
// src/views/Home/HomePage.js - 专业投资分析平台
import React, { useEffect } from 'react';
-import {
- Box,
- Container,
- Heading,
- Text,
- Card,
- CardBody,
- Badge,
+import {
+ Box,
+ Container,
+ Heading,
+ Text,
+ Card,
+ CardBody,
+ Badge,
Button,
Flex,
VStack,
HStack,
SimpleGrid,
- Link
+ Link,
+ useBreakpointValue
} from '@chakra-ui/react';
import { useAuth } from '../../contexts/AuthContext';
import { useNavigate } from 'react-router-dom';
@@ -26,6 +27,15 @@ export default function HomePage() {
const navigate = useNavigate();
const [imageLoaded, setImageLoaded] = React.useState(false);
+ // 响应式配置
+ const heroHeight = useBreakpointValue({ base: '60vh', md: '80vh', lg: '100vh' });
+ const headingSize = useBreakpointValue({ base: 'xl', md: '3xl', lg: '4xl' });
+ const headingLetterSpacing = useBreakpointValue({ base: '-1px', md: '-1.5px', lg: '-2px' });
+ const heroTextSize = useBreakpointValue({ base: 'md', md: 'lg', lg: 'xl' });
+ const containerPx = useBreakpointValue({ base: 10, md: 10, lg: 10 });
+ const showDecorations = useBreakpointValue({ base: false, md: true });
+ const isMobile = useBreakpointValue({ base: true, md: false });
+
// 保留原有的调试信息
useEffect(() => {
logger.debug('HomePage', 'AuthContext状态', {
@@ -128,7 +138,7 @@ export default function HomePage() {
{/* Hero Section - 深色科技风格 */}
@@ -164,59 +174,63 @@ export default function HomePage() {
/>
- {/* 装饰性几何图形 */}
-
-
+ {/* 装饰性几何图形 - 移动端隐藏 */}
+ {showDecorations && (
+ <>
+
+
+ >
+ )}
-
-
+
+
{/* 主标题区域 */}
-
-
+
智能投资分析平台
-
+
专业投资研究工具,助您把握市场机遇
{/* 核心功能面板 */}
-
-
+
+
{/* 新闻催化分析 - 突出显示 */}
-
-
-
-
- {coreFeatures[0].icon}
-
-
-
-
+
+ {isMobile ? (
+ /* 移动端:垂直布局 */
+
+
+
+ {coreFeatures[0].icon}
+
+
+
{coreFeatures[0].title}
-
+
{coreFeatures[0].badge}
-
-
- {coreFeatures[0].description}
-
-
-
-
-
+
+
+
+ {coreFeatures[0].description}
+
+
+
+ ) : (
+ /* 桌面端:横向布局 */
+
+
+
+ {coreFeatures[0].icon}
+
+
+
+
+ {coreFeatures[0].title}
+
+
+ {coreFeatures[0].badge}
+
+
+
+ {coreFeatures[0].description}
+
+
+
+
+
+ )}
{/* 其他5个功能 */}
-
+
{coreFeatures.slice(1).map((feature) => (
handleProductClick(feature.url)}
- minH="180px"
+ minH={{ base: 'auto', md: '180px' }}
>
-
-
+
+
- {feature.icon}
+ {feature.icon}
-
+
{feature.badge}
-
-
-
+
+
+
{feature.title}
-
+
{feature.description}
-
+
@@ -338,17 +401,17 @@ export default function HomePage() {
{/* 底部区域 */}
-
-
-
-
+
+
+
© 2024 价值前沿. 保留所有权利.
-
+