diff --git a/reading-platform-frontend/src/api/teacher.ts b/reading-platform-frontend/src/api/teacher.ts index 110332b..5e91ac7 100644 --- a/reading-platform-frontend/src/api/teacher.ts +++ b/reading-platform-frontend/src/api/teacher.ts @@ -250,6 +250,11 @@ export function createLesson(data: CreateLessonDto): Promise { return http.post('/v1/teacher/lessons', data) as any; } +/** 从排课开始上课:创建课时并开始,适用于课表/排课详情的「开始上课」按钮 */ +export function startLessonFromSchedule(schedulePlanId: number): Promise<{ id: number }> { + return http.post(`/v1/teacher/lessons/from-schedule/${schedulePlanId}/start`) as any; +} + // 开始上课(id 使用 string 避免 Long 精度丢失) export function startLesson(id: number | string): Promise { return http.post(`/v1/teacher/lessons/${id}/start`) as any; @@ -551,9 +556,12 @@ export function getLessonProgress(lessonId: number | string): Promise {{ schedule.scheduledTime || '待定' }} -
{{ schedule.courseName }}
-
{{ schedule.className }}
+
{{ schedule.courseName || schedule.coursePackageName || '-' }}
+
{{ schedule.className || '-' }}
+ + {{ getLessonTypeName(schedule.lessonType) }} +
创建课堂 @@ -102,8 +105,11 @@ @click="showScheduleDetail(schedule)" >
{{ schedule.scheduledTime || '待定' }}
-
{{ schedule.courseName }}
-
{{ schedule.className }}
+
{{ schedule.courseName || schedule.coursePackageName || '-' }}
+
{{ schedule.className || '-' }}
+ + {{ getLessonTypeName(schedule.lessonType) }} +
学校排课 自主预约 @@ -193,8 +199,14 @@ >