fix: 修复 Mock 环境相关概念返回空结果问题

问题分析:
- Mock handler 的过滤逻辑过于严格
- 只保留概念名包含查询关键词的结果
- 导致大部分查询返回空数组

解决方案:
 移除字符串匹配过滤逻辑
- Mock 环境直接返回热门概念
- 模拟真实 API 的语义搜索行为
- 确保每次搜索都有结果展示

 添加详细调试日志
- RelatedConceptsSection 组件渲染日志
- useEffect 触发和参数日志
- 请求发送和响应详情
- 数据处理过程追踪

 完善 Mock 数据结构
- 添加 score, match_type, happened_times, stocks
- 支持详细卡片展示
- 数据结构与线上完全一致

修改文件:
- src/mocks/handlers/concept.js
- src/views/Community/components/DynamicNewsDetail/RelatedConceptsSection/index.js

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
zdl
2025-11-03 16:40:25 +08:00
parent b95607e9b4
commit b14eb175f5
3 changed files with 207 additions and 21 deletions

View File

@@ -152,7 +152,7 @@ const DynamicNewsDetailPanel = ({ event }) => {
{/* 相关概念 */}
<RelatedConceptsSection
keywords={event.keywords}
eventTitle={event.title}
effectiveTradingDate={event.trading_date}
eventTime={event.created_at}
/>