fix(QA): 修复构建阻断与静态资源路径——useMessage 误导入 + plans/citations 根绝对路径改 BASE_URL 前缀(代 bot_qa 验收 #164-#176)
This commit is contained in:
@@ -6,7 +6,7 @@ const docs = ref<Array<{ title: string; sections: number; indexed: boolean }>>([
|
||||
|
||||
onMounted(async () => {
|
||||
try {
|
||||
const resp = await fetch('/iaop/citations.json');
|
||||
const resp = await fetch(`${import.meta.env.BASE_URL}iaop/citations.json`);
|
||||
const d = await resp.json();
|
||||
const docsObj = (d as { documents?: Record<string, string[]> }).documents || {};
|
||||
docs.value = Object.entries(docsObj).map(([title, secs]) => ({ title, sections: secs.length, indexed: true }));
|
||||
|
||||
@@ -39,7 +39,7 @@ onMounted(async () => {
|
||||
offline.value = true;
|
||||
}
|
||||
try {
|
||||
const resp = await fetch('/iaop/citations.json');
|
||||
const resp = await fetch(`${import.meta.env.BASE_URL}iaop/citations.json`);
|
||||
const d = await resp.json();
|
||||
citations.value = (d as { documents?: Record<string, string[]> }).documents || {};
|
||||
} catch {
|
||||
|
||||
Reference in New Issue
Block a user