fix(aihr): label case list demo fallback

This commit is contained in:
2026-07-14 12:22:25 +08:00
parent 3e3cd539d2
commit 5b91007182
3 changed files with 14 additions and 0 deletions
+12
View File
@@ -14,6 +14,15 @@
</div>
</section>
<el-alert
v-if="recordsFallback"
class="demo-data-alert"
title="案例列表接口暂不可用,当前显示演示记录,不代表真实案例库数据"
type="warning"
:closable="false"
show-icon
/>
<section class="case-grid">
<article class="panel upload-panel">
<div class="panel-title">
@@ -180,6 +189,7 @@ const apiTags = ref<CaseTag[]>([]);
const apiRecord = ref<CaseRecord | null>(null);
const apiSampleHint = ref('');
const recordsLoading = ref(false);
const recordsFallback = ref(false);
const detailVisible = ref(false);
const caseDetail = ref<CaseDetailResponse | null>(null);
const projectExtOrgId = ref('');
@@ -276,8 +286,10 @@ async function loadCaseRecords() {
try {
const { data } = await getCaseRecords();
records.value = data ?? [];
recordsFallback.value = false;
} catch {
records.value = [...baseRecords];
recordsFallback.value = true;
ElMessage.warning('案例列表接口暂不可用,当前展示演示记录');
} finally {
recordsLoading.value = false;