首页、学情、任务绑定接口

This commit is contained in:
hexi
2026-11-06 16:43:41 +08:00
parent af73453035
commit 4a19192d73
16 changed files with 965 additions and 236 deletions
+10 -1
View File
@@ -56,7 +56,7 @@
import MainTabBar from '../../components/main-tab-bar.uvue'
import UniIcons from '../../uni_modules/uni-icons-x/components/uni-icons/uni-icons.uvue'
import { apiGetTodayLearningDetail, type TodayLearningDetail } from '../../api/student'
import { homeStudentProfile } from '../../store/home'
import { homeStudentProfile, selectedStudentChangeVersion } from '../../store/home'
const isLoading = ref(true)
const detail = ref<TodayLearningDetail>({
@@ -64,12 +64,21 @@
answerCount: 0, completedPackages: 0, totalPackages: 0, masteredPoints: 0, courses: [],
score: { accuracy: 0, yesterdayAccuracy: 0, change: 0 }, pointsTotal: 0, pointDetails: []
})
const observedStudentVersion = ref(selectedStudentChangeVersion.value)
onLoad(() => {
loadTodayLearning()
})
onShow(() => {
if (observedStudentVersion.value !== selectedStudentChangeVersion.value) {
observedStudentVersion.value = selectedStudentChangeVersion.value
loadTodayLearning()
}
})
async function loadTodayLearning() {
isLoading.value = true
const studentId = homeStudentProfile.value?.id ?? ''
if (!studentId) {
isLoading.value = false