fix(aihr): clear stale candidate records on fetch failure

This commit is contained in:
2026-07-14 12:44:44 +08:00
parent d31a09a846
commit e834546d23
6 changed files with 24 additions and 0 deletions
@@ -83,6 +83,11 @@ const reviewStatusDescription = computed(() => latestMaterial.value?.status ===
? 'HR 已完成 AI 评分与补充资料复核,后续通知会同步更新。'
: 'HR 正在复核 AI 评分与补充资料,预计 1-2 个工作日更新。');
const clearData = () => {
records.value = [];
materials.value = [];
};
const loadPage = async () => {
loggedIn.value = isLoggedIn();
if (!loggedIn.value) {
@@ -97,6 +102,7 @@ const loadPage = async () => {
]);
message.value = '';
} catch (error) {
clearData();
loggedIn.value = isLoggedIn();
message.value = loggedIn.value ? (error instanceof Error ? error.message : '面试记录加载失败') : '登录已过期,请重新登录';
}