diff --git a/src/api/modules/teachCourse.ts b/src/api/modules/teachCourse.ts index 0f2f2bb..2b9e716 100644 --- a/src/api/modules/teachCourse.ts +++ b/src/api/modules/teachCourse.ts @@ -505,6 +505,63 @@ export class TeachCourseApi { throw error } } + + /** + * 查询视频章节 + */ + static async getSectionVideo(courseId:string,sectionId: string): Promise> { + try { + const response = await ApiRequest.get<{ result: any }>(`/aiol/aiolCourse/${courseId}/section_video/${sectionId}`) + console.log('📑 查询小节绑定的视频响应:', response) + return response + } catch (error) { + console.error('❌ 查询小节绑定的视频失败:', error) + throw error + } + } + + /** + * 查询文档章节 + */ + static async getSectionDocument(courseId:string,sectionId: string): Promise> { + try { + const response = await ApiRequest.get<{ result: any }>(`/aiol/aiolCourse/${courseId}/section_document/${sectionId}`) + console.log('📑 查询小节绑定的文档响应:', response) + return response + } catch (error) { + console.error('❌ 查询小节绑定的文档失败:', error) + throw error + } + } + + /** + * 查询考试章节 + */ + static async getSectionExam(courseId:string,sectionId: string): Promise> { + try { + const response = await ApiRequest.get<{ result: any }>(`/aiol/aiolCourse/${courseId}/section_exam/${sectionId}`) + console.log('📑 查询小节绑定的考试响应:', response) + return response + } catch (error) { + console.error('❌ 查询小节绑定的考试失败:', error) + throw error + } + } + + /** + * 查询作业章节 + */ + static async getSectionHomeWork(courseId:string,sectionId: string): Promise> { + try { + const response = await ApiRequest.get<{ result: any }>(`/aiol/aiolCourse/${courseId}/section_homework/${sectionId}`) + console.log('📑 查询小节绑定的作业响应:', response) + return response + } catch (error) { + console.error('❌ 查询小节绑定的作业失败:', error) + throw error + } + } + } // 作业相关类型定义 @@ -603,9 +660,9 @@ export class HomeworkApi { */ static async editHomework(data: EditHomeworkRequest): Promise> { try { - console.log('🚀 发送编辑作业请求:', { url: '/aiol/aiolHomework/edit', data }) + console.log('🚀 发送编辑作业请求:', { url: '/aiol/aiolHomework/teacher_edit', data }) - const response = await ApiRequest.put('/aiol/aiolHomework/edit', data) + const response = await ApiRequest.post('/aiol/aiolHomework/teacher_edit', data) console.log('✏️ 编辑作业响应:', response) return response @@ -1079,4 +1136,21 @@ class DiscussionApi { throw error } } + + /** + * 评论取消置顶 + */ + static async untopComment(commentId: string): Promise { + try { + console.log('🚀 发送评论取消置顶请求:', { url: `/aiol/aiolComment/untop/${commentId}`, commentId }) + + const response = await ApiRequest.get(`/aiol/aiolComment/untop/${commentId}`) + + console.log('👍 评论取消置顶响应:', response) + return response + } catch (error) { + console.error('❌ 评论取消置顶失败:', error) + throw error + } + } } \ No newline at end of file diff --git a/src/components/ExamPaperLibraryModal.vue b/src/components/ExamPaperLibraryModal.vue index 3ef559b..a57629b 100644 --- a/src/components/ExamPaperLibraryModal.vue +++ b/src/components/ExamPaperLibraryModal.vue @@ -16,7 +16,7 @@ -->
- +
已全部加载,共{{ totalCount }}份考试/练习 @@ -70,14 +70,14 @@
-
+