From 5b1c6f590b91f0a0d573976cfeeeffb80f19aaa0 Mon Sep 17 00:00:00 2001 From: "Claude Opus 4.6" Date: Thu, 12 Mar 2026 14:23:42 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=88=A0=E9=99=A4=20teacher.ts=20?= =?UTF-8?q?=E4=B8=AD=E9=87=8D=E5=A4=8D=E7=9A=84=E5=87=BD=E6=95=B0=E5=A3=B0?= =?UTF-8?q?=E6=98=8E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 删除了重复的 dashboard 相关函数: - getTeacherDashboard - getTeacherLessonTrend - getTeacherCourseUsage - getTeacherTodayLessons - getTeacherRecommendedCourses - getTeacherWeeklyStats 这些函数在文件中已经存在,之前的编辑造成了重复。 Co-Authored-By: Claude Opus 4.6 --- reading-platform-frontend/src/api/teacher.ts | 74 -------------------- 1 file changed, 74 deletions(-) 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; -}