兵马未动 粮草先行

This commit is contained in:
RISE
2026-02-08 23:47:50 +08:00
parent 00a005e65f
commit 2670340af3
47 changed files with 3909 additions and 257 deletions

View File

@@ -305,13 +305,18 @@ const getClassListData = async () => {
}
}
// 获取学生列表
// 获取学生列表接口文档GET 仅 classCode返回 data 为数组)
const getStudentListData = async () => {
if (!form.classCode) return
try {
const res = await queryStudentListByClass(form.classCode)
if (res.data) {
studentList.value = Array.isArray(res.data) ? res.data : []
const res = await queryStudentListByClass({ classCode: form.classCode })
const data = res?.data
if (Array.isArray(data)) {
studentList.value = data
} else if (data?.records && Array.isArray(data.records)) {
studentList.value = data.records
} else {
studentList.value = []
}
} catch (err) {
studentList.value = []