From 657c44659452dff8040643002bcc302bfbf323f0 Mon Sep 17 00:00:00 2001 From: zdl <3489966805@qq.com> Date: Mon, 27 Oct 2025 21:14:51 +0800 Subject: [PATCH 1/5] =?UTF-8?q?feat:=20=E9=94=99=E8=AF=AFlogger=20?= =?UTF-8?q?=E4=B8=8D=E5=9C=A8=E8=A2=ABerror=E9=A1=B5=E9=9D=A2=E6=8D=95?= =?UTF-8?q?=E8=8E=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/ErrorBoundary.js | 138 ++++++++++++++++---------------- 1 file changed, 70 insertions(+), 68 deletions(-) diff --git a/src/components/ErrorBoundary.js b/src/components/ErrorBoundary.js index c8e72484..503c8730 100755 --- a/src/components/ErrorBoundary.js +++ b/src/components/ErrorBoundary.js @@ -1,14 +1,14 @@ import React from 'react'; -import { - Box, - Alert, - AlertIcon, - AlertTitle, - AlertDescription, - Button, - VStack, - Container -} from '@chakra-ui/react'; +// import { +// Box, +// Alert, +// AlertIcon, +// AlertTitle, +// AlertDescription, +// Button, +// VStack, +// Container +// } from '@chakra-ui/react'; import { logger } from '../utils/logger'; class ErrorBoundary extends React.Component { @@ -40,66 +40,68 @@ class ErrorBoundary extends React.Component { } render() { - // 如果有错误,显示错误边界(所有环境) - if (this.state.hasError) { - return ( - - - - - - - 页面出现错误! - - - {process.env.NODE_ENV === 'development' - ? '组件渲染时发生错误,请查看下方详情和控制台日志。' - : '页面加载时发生了未预期的错误,请尝试刷新页面。'} - - - + // 静默模式:捕获错误并记录日志(已在 componentDidCatch 中完成) + // 但继续渲染子组件,不显示错误页面 + // 注意:如果组件因错误无法渲染,该区域可能显示为空白 + // // 如果有错误,显示错误边界(所有环境) + // if (this.state.hasError) { + // return ( + // + // + // + // + // + // + // 页面出现错误! + // + // + // {process.env.NODE_ENV === 'development' + // ? '组件渲染时发生错误,请查看下方详情和控制台日志。' + // : '页面加载时发生了未预期的错误,请尝试刷新页面。'} + // + // + // - {/* 开发环境显示详细错误信息 */} - {process.env.NODE_ENV === 'development' && this.state.error && ( - - 错误详情: - - {this.state.error.name}: {this.state.error.message} - {this.state.error.stack && ( - {this.state.error.stack} - )} - {this.state.errorInfo && this.state.errorInfo.componentStack && ( - <> - 组件堆栈: - {this.state.errorInfo.componentStack} - - )} - - - )} - - - - - ); - } + // {/* 开发环境显示详细错误信息 */} + // {process.env.NODE_ENV === 'development' && this.state.error && ( + // + // 错误详情: + // + // {this.state.error.name}: {this.state.error.message} + // {this.state.error.stack && ( + // {this.state.error.stack} + // )} + // {this.state.errorInfo && this.state.errorInfo.componentStack && ( + // <> + // 组件堆栈: + // {this.state.errorInfo.componentStack} + // + // )} + // + // + // )} + // + // + // + // ); + // } return this.props.children; } } From 95c1eaf97be16a206ae8eea9301f2e1912726067 Mon Sep 17 00:00:00 2001 From: zdl <3489966805@qq.com> Date: Mon, 27 Oct 2025 22:29:53 +0800 Subject: [PATCH 2/5] =?UTF-8?q?bugfix=EF=BC=9A=E4=BF=AE=E5=A4=8D=E8=AD=A6?= =?UTF-8?q?=E5=91=8A=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/Community/components/PopularKeywords.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/views/Community/components/PopularKeywords.js b/src/views/Community/components/PopularKeywords.js index 06596c88..4c115f6a 100644 --- a/src/views/Community/components/PopularKeywords.js +++ b/src/views/Community/components/PopularKeywords.js @@ -138,9 +138,9 @@ const PopularKeywords = ({ onKeywordClick, keywords: propKeywords }) => { {/* 所有标签 */} - {keywords.map((item) => ( + {keywords.map((item, index) => ( Date: Mon, 27 Oct 2025 22:31:06 +0800 Subject: [PATCH 3/5] =?UTF-8?q?feat:=20=E8=B7=AF=E7=94=B1=E9=93=BE?= =?UTF-8?q?=E6=8E=A5=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 | 70 ++++++++++++++++---------------------- 1 file changed, 30 insertions(+), 40 deletions(-) diff --git a/src/views/Home/HomePage.js b/src/views/Home/HomePage.js index cf5ad4f9..9c83f1af 100755 --- a/src/views/Home/HomePage.js +++ b/src/views/Home/HomePage.js @@ -51,11 +51,11 @@ export default function HomePage() { const coreFeatures = [ { id: 'news-catalyst', - title: '新闻催化分析', + title: '新闻中心', description: '实时新闻事件分析,捕捉市场催化因子', icon: '📊', color: 'yellow', - url: 'https://valuefrontier.cn/community', + url: '/community', badge: '核心', featured: true }, @@ -65,7 +65,7 @@ export default function HomePage() { description: '热门概念与主题投资分析追踪', icon: '🎯', color: 'purple', - url: 'https://valuefrontier.cn/concepts', + url: '/concepts', badge: '热门' }, { @@ -74,7 +74,7 @@ export default function HomePage() { description: '全面的个股基本面信息整合', icon: '📈', color: 'blue', - url: 'https://valuefrontier.cn/stocks', + url: '/stocks', badge: '全面' }, { @@ -83,7 +83,7 @@ export default function HomePage() { description: '涨停板数据深度分析与规律挖掘', icon: '🚀', color: 'green', - url: 'https://valuefrontier.cn/limit-analyse', + url: '/limit-analyse', badge: '精准' }, { @@ -92,7 +92,7 @@ export default function HomePage() { description: '个股全方位分析与投资决策支持', icon: '🧭', color: 'orange', - url: 'https://valuefrontier.cn/company?scode=688256', + url: '/company?scode=688256', badge: '专业' }, { @@ -106,15 +106,6 @@ export default function HomePage() { } ]; - // 个人中心配置 - // const personalCenter = { - // title: '个人中心', - // description: '账户管理与个人设置', - // icon: '👤', - // color: 'gray', - // url: 'https://valuefrontier.cn/home/center' - // }; - // @TODO 如何区分内部链接和外部链接? const handleProductClick = (url) => { if (url.startsWith('http')) { @@ -202,7 +193,7 @@ export default function HomePage() { )} - + {/* 主标题区域 */} @@ -225,7 +216,7 @@ export default function HomePage() { - {/* 新闻催化分析 - 突出显示 */} + {/* 新闻中心 - 突出显示 */} {coreFeatures.slice(1).map((feature) => ( - handleProductClick(feature.url)} - minH={{ base: 'auto', md: '180px' }} - > + handleProductClick(feature.url)} + minH={{ base: 'auto', md: '180px' }} + > From 58254d3e8ffe3ffc83cca32eded46dccee95bde3 Mon Sep 17 00:00:00 2001 From: zdl <3489966805@qq.com> Date: Mon, 27 Oct 2025 22:31:41 +0800 Subject: [PATCH 4/5] =?UTF-8?q?bugfix=EF=BC=9A=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/Community/components/UnifiedSearchBox.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/views/Community/components/UnifiedSearchBox.js b/src/views/Community/components/UnifiedSearchBox.js index fd2a66ea..429428b9 100644 --- a/src/views/Community/components/UnifiedSearchBox.js +++ b/src/views/Community/components/UnifiedSearchBox.js @@ -523,7 +523,11 @@ const UnifiedSearchBox = ({ onFocus={onSearchFocus} options={stockOptions} placeholder="请输入股票代码/股票名称/相关话题" - onPressEnter={handleMainSearch} + onKeyDown={(e) => { + if (e.key === 'Enter') { + handleMainSearch(); + } + }} style={{ flex: 1 }} size="large" notFoundContent={inputValue && stockOptions.length === 0 ? "未找到匹配的股票" : null} From 72aae585d03c06232ae15250577951ad9a224818 Mon Sep 17 00:00:00 2001 From: zdl <3489966805@qq.com> Date: Tue, 28 Oct 2025 11:18:39 +0800 Subject: [PATCH 5/5] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E9=A6=96=E9=A1=B5?= =?UTF-8?q?=E8=B7=AF=E7=94=B1=E8=B7=B3=E8=BD=AC=E5=A4=B1=E8=B4=A5=E7=9A=84?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/Community/components/MidjourneyHeroSection.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/views/Community/components/MidjourneyHeroSection.js b/src/views/Community/components/MidjourneyHeroSection.js index 50a2a7a0..dfb5c035 100644 --- a/src/views/Community/components/MidjourneyHeroSection.js +++ b/src/views/Community/components/MidjourneyHeroSection.js @@ -480,9 +480,10 @@ export default function MidjourneyHeroSection() { minH="100vh" bg="linear-gradient(135deg, #0f0f0f 0%, #1a1a1a 50%, #000000 100%)" overflow="hidden" + pointerEvents="none" > {/* 粒子背景 */} - + {/* 内容容器 */} - + {/* 左侧文本内容 */} @@ -776,7 +777,7 @@ export default function MidjourneyHeroSection() { borderRadius="full" filter="blur(40px)" animation="pulse 4s ease-in-out infinite" - animationDelay="2s" + sx={{ animationDelay: '2s' }} /> @@ -793,7 +794,7 @@ export default function MidjourneyHeroSection() { right={0} h="128px" bgGradient="linear(to-t, black, transparent)" - zIndex={10} + zIndex={-1} /> {/* 全局样式 */}