fix(QA): 修复构建阻断与静态资源路径——useMessage 误导入 + plans/citations 根绝对路径改 BASE_URL 前缀(代 bot_qa 验收 #164-#176)

This commit is contained in:
2026-08-06 13:14:52 +08:00
parent 787234146b
commit 1b7c2b0177
7 changed files with 51 additions and 1142 deletions
@@ -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 {