web-学习

This commit is contained in:
2025-10-24 18:28:35 +08:00
parent 8968409b2d
commit bc84bd82cc
16 changed files with 1090 additions and 239 deletions

View File

@@ -138,8 +138,8 @@ const progressPercent = computed(() => {
});
onMounted(() => {
loadUserProgress();
loadTaskList();
loadUserProgress();
});
// 获取当前用户ID
@@ -199,6 +199,7 @@ async function loadUserProgress() {
const pending = (progressData.notStartTaskNum || 0) + (progressData.learningTaskNum || 0);
// 设置统计数据
totalCount.value = progressData.totalTaskNum || 0;
completedCount.value = progressData.completedTaskNum || 0;
pendingCount.value = pending;
}
} catch (error) {
@@ -244,7 +245,7 @@ function getDeadlineStatus(task: LearningTask): { show: boolean; text: string; t
if (task.status === 2) {
// 已完成
return { show: true, text: '已截止', type: 'success' };
return { show: true, text: '已完成', type: 'success' };
} else if (diffDays < 0) {
// 已过期
return { show: true, text: '已截止', type: 'info' };