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;
}
}
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}
/>
{/* 全局样式 */}
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) => (
{
+ if (e.key === 'Enter') {
+ handleMainSearch();
+ }
+ }}
style={{ flex: 1 }}
size="large"
notFoundContent={inputValue && stockOptions.length === 0 ? "未找到匹配的股票" : null}
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' }}
+ >