修改concept

This commit is contained in:
2025-12-28 13:42:57 +08:00
parent 09f187f95a
commit f35a5b4b47
7 changed files with 202 additions and 7 deletions

View File

@@ -29,6 +29,7 @@ import { AlertCircle, Clock, TrendingUp, Info, RefreshCw } from 'lucide-react';
import ReactECharts from 'echarts-for-react';
import { logger } from '@utils/logger';
import { getApiBase } from '@utils/apiConfig';
import { getConceptHtmlUrl } from '@utils/textUtils';
import { useIndexQuote } from '@hooks/useIndexQuote';
import conceptStaticService from '@services/conceptStaticService';
import { GLASS_BLUR } from '@/constants/glassConfig';
@@ -450,7 +451,7 @@ const FlowingConcepts = () => {
};
const handleClick = (name) => {
window.open(`https://valuefrontier.cn/htmls/${name}.html`, '_blank');
window.open(getConceptHtmlUrl(name), '_blank');
};
if (loading) {

View File

@@ -44,6 +44,7 @@ import {
ArrowLeft,
} from 'lucide-react';
import { logger } from '../../../utils/logger';
import { getConceptHtmlUrl } from '../../../utils/textUtils';
import { GLASS_BLUR } from '@/constants/glassConfig';
// 极光动画 - 黑金色主题
@@ -942,7 +943,7 @@ const ForceGraphView = ({
if (data.level === 'concept') {
// 跳转到概念详情页
const htmlPath = `https://valuefrontier.cn/htmls/${encodeURIComponent(params.name)}.html`;
const htmlPath = getConceptHtmlUrl(params.name);
window.open(htmlPath, '_blank');
return;
}

View File

@@ -62,6 +62,7 @@ import {
ExternalLink,
} from 'lucide-react';
import { logger } from '../../../utils/logger';
import { getConceptHtmlUrl } from '../../../utils/textUtils';
import { GLASS_BLUR } from '@/constants/glassConfig';
// 一级分类图标映射
@@ -685,7 +686,7 @@ const HierarchyView = ({
]);
} else if (item.level === 'concept') {
// 跳转到概念详情页
const htmlPath = `https://valuefrontier.cn/htmls/${encodeURIComponent(item.name)}.html`;
const htmlPath = getConceptHtmlUrl(item.name);
window.open(htmlPath, '_blank');
}
}, [currentLv1, currentLv2]);

View File

@@ -1,6 +1,7 @@
import React, { useState, useEffect, useCallback } from 'react';
import { useSearchParams, useNavigate } from 'react-router-dom';
import { logger } from '../../utils/logger';
import { getConceptHtmlUrl } from '../../utils/textUtils';
import defaultEventImage from '../../assets/img/default-event.jpg';
import {
Box,
@@ -674,7 +675,7 @@ const ConceptCenter = () => {
trackConceptClicked(concept, position);
}
const htmlPath = `https://valuefrontier.cn/htmls/${encodeURIComponent(conceptName)}.html`;
const htmlPath = getConceptHtmlUrl(conceptName);
window.open(htmlPath, '_blank');
};

View File

@@ -34,6 +34,7 @@ import dayjs from 'dayjs';
import tradingDayUtils from '../../../utils/tradingDayUtils'; // 引入交易日工具
import { logger } from '../../../utils/logger';
import { getApiBase } from '../../../utils/apiConfig';
import { getConceptHtmlUrl } from '../../../utils/textUtils';
import { PROFESSIONAL_COLORS } from '../../../constants/professionalTheme';
// 增强版 ConceptCard 组件 - 展示更多数据细节
@@ -61,7 +62,7 @@ const ConceptCard = ({ concept, tradingDate, onViewDetails }) => {
// 处理概念点击
const handleConceptClick = () => {
window.open(`https://valuefrontier.cn/htmls/${encodeURIComponent(concept.concept)}.html`, '_blank');
window.open(getConceptHtmlUrl(concept.concept), '_blank');
};
return (
@@ -758,7 +759,7 @@ const RelatedConcepts = ({ eventTitle, eventTime, eventId, loading: externalLoad
size="lg"
flex={1}
onClick={() => {
window.open(`https://valuefrontier.cn/htmls/${encodeURIComponent(selectedConcept.concept)}.html`, '_blank');
window.open(getConceptHtmlUrl(selectedConcept.concept), '_blank');
}}
leftIcon={<Icon as={ExternalLink} boxSize={4} />}
>

View File

@@ -55,6 +55,7 @@ import HotspotOverview from './components/HotspotOverview';
import FlexScreen from './components/FlexScreen';
import { echarts } from '@lib/echarts';
import { logger } from '../../utils/logger';
import { getConceptHtmlUrl } from '../../utils/textUtils';
import tradingDays from '../../data/tradingDays.json';
import { useStockOverviewEvents } from './hooks/useStockOverviewEvents';
import { GLASS_BLUR } from '@/constants/glassConfig';
@@ -534,7 +535,7 @@ const StockOverview = () => {
// 🎯 追踪概念点击
trackConceptClicked(concept, rank);
const htmlPath = `/htmls/${concept.concept_name}.html`;
const htmlPath = getConceptHtmlUrl(concept.concept_name);
window.open(htmlPath, '_blank');
};