diff --git a/reading-platform-frontend/src/api/teacher.ts b/reading-platform-frontend/src/api/teacher.ts index a571509..a9cb46d 100644 --- a/reading-platform-frontend/src/api/teacher.ts +++ b/reading-platform-frontend/src/api/teacher.ts @@ -747,77 +747,3 @@ export const getMonthlyTaskStats = (months?: number) => { return api.teacherTaskControllerGetMonthlyStats(params) as any; }; -// ==================== 教师控制台 API ==================== - -export interface DashboardStats { - classCount: number; - studentCount: number; - lessonCount: number; - courseCount: number; -} - -export interface TodayLesson { - id: number; - classId: number; - className: string; - courseId: number; - courseName: string; - scheduledTime: string; - status: 'PENDING' | 'IN_PROGRESS' | 'COMPLETED' | 'CANCELLED'; -} - -export interface RecommendedCourse { - id: number; - name: string; - coverImagePath?: string; - gradeTags: string[]; - domainTags: string[]; - duration: number; - publishedAt: string; -} - -export interface RecentActivity { - id: number; - type: 'lesson' | 'feedback' | 'task'; - title: string; - description: string; - time: string; -} - -export interface TeacherDashboardResponse { - stats: DashboardStats; - todayLessons: TodayLesson[]; - recommendedCourses: RecommendedCourse[]; - recentActivities: RecentActivity[]; -} - -// 获取教师控制台数据 -export function getTeacherDashboard(): Promise { - return api.teacherCourseControllerGetDashboard() as any; -} - -// 获取授课趋势 -export function getTeacherLessonTrend(months: number = 6): Promise { - const params: TeacherCourseControllerGetLessonTrendParams = { months: String(months) }; - return api.teacherCourseControllerGetLessonTrend(params) as any; -} - -// 获取课程使用情况 -export function getTeacherCourseUsage(): Promise { - return api.teacherCourseControllerGetCourseUsage() as any; -} - -// 获取今日课程 -export function getTeacherTodayLessons(): Promise { - return api.teacherCourseControllerGetTodayLessons() as any; -} - -// 获取推荐课程 -export function getTeacherRecommendedCourses(): Promise { - return api.teacherCourseControllerGetRecommend() as any; -} - -// 获取周统计数据 -export function getTeacherWeeklyStats(): Promise { - return api.teacherCourseControllerGetWeekly() as any; -}