From ce1bf29270105c065aa28f7e2dfd2634548caaf8 Mon Sep 17 00:00:00 2001
From: zdl <3489966805@qq.com>
Date: Wed, 29 Oct 2025 19:08:51 +0800
Subject: [PATCH] =?UTF-8?q?feat:=20=E6=B6=A8=E5=81=9C=E5=88=86=E6=9E=90/?=
=?UTF-8?q?=E8=82=A1=E7=A5=A8=E8=AF=A6=E6=83=85=E5=BC=B9=E7=AA=97=20?=
=?UTF-8?q?=E6=B7=BB=E5=8A=A0=E9=A3=8E=E9=99=A9=E6=8F=90=E7=A4=BA?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../components/DataVisualizationComponents.js | 4 ++++
.../LimitAnalyse/components/SectorDetails.js | 4 +++-
src/views/LimitAnalyse/index.js | 24 +++++++++++++++++++
3 files changed, 31 insertions(+), 1 deletion(-)
diff --git a/src/views/LimitAnalyse/components/DataVisualizationComponents.js b/src/views/LimitAnalyse/components/DataVisualizationComponents.js
index 4549a148..4c02148f 100644
--- a/src/views/LimitAnalyse/components/DataVisualizationComponents.js
+++ b/src/views/LimitAnalyse/components/DataVisualizationComponents.js
@@ -38,6 +38,7 @@ import {
} from '@chakra-ui/react';
import { getFormattedTextProps } from '../../../utils/textUtils';
import { ExternalLinkIcon } from '@chakra-ui/icons';
+import RiskDisclaimer from '../../../components/RiskDisclaimer';
import './WordCloud.css';
import {
BarChart, Bar,
@@ -598,6 +599,9 @@ export const StockDetailModal = ({ isOpen, onClose, selectedStock }) => {
))}
+
+ {/* 风险提示 */}
+
diff --git a/src/views/LimitAnalyse/components/SectorDetails.js b/src/views/LimitAnalyse/components/SectorDetails.js
index e5cadadd..5c1406bf 100644
--- a/src/views/LimitAnalyse/components/SectorDetails.js
+++ b/src/views/LimitAnalyse/components/SectorDetails.js
@@ -29,7 +29,7 @@ import {
import { StarIcon, ViewIcon, TimeIcon, ChevronDownIcon, ChevronUpIcon } from '@chakra-ui/icons';
import { getFormattedTextProps } from '../../../utils/textUtils';
-const SectorDetails = ({ sortedSectors, totalStocks }) => {
+const SectorDetails = ({ sortedSectors, totalStocks, onStockClick }) => {
// 使用 useRef 来维持展开状态,避免重新渲染时重置
const expandedSectorsRef = useRef([]);
const [expandedSectors, setExpandedSectors] = useState([]);
@@ -194,6 +194,8 @@ const SectorDetails = ({ sortedSectors, totalStocks }) => {
bg: 'gray.50'
}}
transition="all 0.2s"
+ cursor="pointer"
+ onClick={() => onStockClick && onStockClick(stock)}
>
diff --git a/src/views/LimitAnalyse/index.js b/src/views/LimitAnalyse/index.js
index 18ca03f1..0be7d766 100755
--- a/src/views/LimitAnalyse/index.js
+++ b/src/views/LimitAnalyse/index.js
@@ -60,6 +60,8 @@ export default function LimitAnalyse() {
const [wordCloudData, setWordCloudData] = useState([]);
const [searchResults, setSearchResults] = useState(null);
const [isSearchOpen, setIsSearchOpen] = useState(false);
+ const [selectedStock, setSelectedStock] = useState(null);
+ const [isStockDetailOpen, setIsStockDetailOpen] = useState(false);
const toast = useToast();
@@ -243,6 +245,20 @@ export default function LimitAnalyse() {
}
};
+ // 处理股票点击
+ const handleStockClick = (stock) => {
+ setSelectedStock(stock);
+ setIsStockDetailOpen(true);
+ // 🎯 追踪股票详情查看
+ trackStockDetailViewed(stock.scode, stock.sname, 'sector_details');
+ };
+
+ // 关闭股票详情弹窗
+ const handleCloseStockDetail = () => {
+ setIsStockDetailOpen(false);
+ setSelectedStock(null);
+ };
+
// 处理板块数据排序
const getSortedSectorData = () => {
if (!dailyData?.sector_data) return [];
@@ -470,6 +486,7 @@ export default function LimitAnalyse() {
)}
@@ -496,6 +513,13 @@ export default function LimitAnalyse() {
onStockClick={() => {}}
/>
+ {/* 股票详情弹窗 */}
+
+
{/* 浮动按钮 */}