fix(aihr): keep interview record fallback honest

This commit is contained in:
2026-07-14 12:28:01 +08:00
parent 709a6cbbf6
commit e6b3ad11bc
3 changed files with 15 additions and 1 deletions
+13 -1
View File
@@ -13,6 +13,15 @@
</div>
</section>
<el-alert
v-if="recordsFallback"
class="demo-data-alert"
title="面试记录接口暂不可用,当前显示演示记录,不代表真实面试数据"
type="warning"
:closable="false"
show-icon
/>
<section class="flow-strip">
<div v-for="step in flowSteps" :key="step.title" class="flow-step" :class="{ active: step.active, done: step.done }">
<span>{{ step.index }}</span>
@@ -473,6 +482,7 @@ const apiQuestions = ref<InterviewQuestion[]>([]);
const apiScoreResult = ref<CandidateSeed['scoreResult'] | null>(null);
const answers = reactive<Record<string, string>>({});
const records = ref<InterviewRecord[]>([...baseRecords]);
const recordsFallback = ref(false);
const interviewReviewVisible = ref(false);
const interviewReviewSaving = ref(false);
const reviewingRecord = ref<InterviewRecord | null>(null);
@@ -672,9 +682,11 @@ const questionPillClass = (question: InterviewQuestion) => {
const loadInterviewRecords = async () => {
try {
const { data } = await listInterviewRecords(20);
records.value = data?.length ? data : [...baseRecords];
records.value = data ?? [];
recordsFallback.value = false;
} catch {
records.value = [...baseRecords];
recordsFallback.value = true;
}
};