refactor: 目录结构增加 Topic 层级 topics/qunar-ai-fullstack/
子主题目录从 topics/{slug} 移至 topics/qunar-ai-fullstack/{slug}
前端 fetch 路径改用 subtopic.path 字段
Co-Authored-By: Claude Code <noreply@anthropic.com>
This commit is contained in:
+3
-3
@@ -345,13 +345,13 @@ async function selectTopic(slug) {
|
||||
if (!topic) return;
|
||||
|
||||
try {
|
||||
// Load meta to get question file list
|
||||
const metaRes = await fetch(`topics/${slug}/meta.json`);
|
||||
const topicPath = topic.path;
|
||||
const metaRes = await fetch(`${topicPath}/meta.json`);
|
||||
const meta = await metaRes.json();
|
||||
|
||||
currentQuestions = [];
|
||||
for (const typeFile of meta.question_files) {
|
||||
const qRes = await fetch(`topics/${slug}/${typeFile}.json`);
|
||||
const qRes = await fetch(`${topicPath}/${typeFile}.json`);
|
||||
const qData = await qRes.json();
|
||||
currentQuestions.push(...qData.questions);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user