fix: 添加热门概念静态数据的 mock handler
- 拦截 /data/concept/latest.json 请求 - 返回 mock 生成的热门概念数据 - 修复 HeroPanel 热门概念模块无数据问题 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -848,5 +848,18 @@ export const conceptHandlers = [
|
||||
lv1_id: lv1Id,
|
||||
lv2_id: lv2Id
|
||||
});
|
||||
}),
|
||||
|
||||
// 热门概念静态数据文件(HeroPanel 使用)
|
||||
http.get('/data/concept/latest.json', async () => {
|
||||
await delay(200);
|
||||
console.log('[Mock Concept] 获取热门概念静态数据');
|
||||
|
||||
const concepts = generatePopularConcepts(30);
|
||||
|
||||
return HttpResponse.json({
|
||||
date: new Date().toISOString().split('T')[0],
|
||||
results: concepts
|
||||
});
|
||||
})
|
||||
];
|
||||
|
||||
Reference in New Issue
Block a user