web-学习
This commit is contained in:
@@ -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' };
|
||||
|
||||
Reference in New Issue
Block a user