From 177bdbc00990fd624bdb8c8e497976fd61f98ac6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B0=8F=E5=BC=A0?= <2091066548@qq.com> Date: Wed, 3 Sep 2025 22:17:48 +0800 Subject: [PATCH] =?UTF-8?q?feat=EF=BC=9A=E8=AF=BE=E7=A8=8B=E5=88=97?= =?UTF-8?q?=E8=A1=A8ai=E4=BC=B4=E5=AD=A6=E6=A8=A1=E5=BC=8F=E4=BF=AE?= =?UTF-8?q?=E5=8F=91=E5=B8=83=E8=AF=84=E8=AE=BA=E5=AF=B9=E6=8E=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/modules/comment.ts | 18 +++++ src/views/CourseExchanged.vue | 126 +++++++++++++++++++++++++++++++--- 2 files changed, 134 insertions(+), 10 deletions(-) diff --git a/src/api/modules/comment.ts b/src/api/modules/comment.ts index f54a499..355ee33 100644 --- a/src/api/modules/comment.ts +++ b/src/api/modules/comment.ts @@ -29,6 +29,24 @@ export class CommentApi { return ApiRequest.get(`/lessons/${lessonId}/comments`, params) } + // 发送课程评论 + static async postCourseComment(courseId: string, data: { + content: string + imgs?: string + }): Promise> { + try { + console.log('🚀 发送课程评论:', { courseId, data }) + + const response = await ApiRequest.post(`/aiol/aiolComment/course/${courseId}/add`, data) + console.log('✅ 发送课程评论成功:', response) + + return response + } catch (error) { + console.error('❌ 发送课程评论失败:', error) + throw error + } + } + // 添加课程评论 static addCourseComment(courseId: number, data: { content: string diff --git a/src/views/CourseExchanged.vue b/src/views/CourseExchanged.vue index 94a9548..8a55664 100644 --- a/src/views/CourseExchanged.vue +++ b/src/views/CourseExchanged.vue @@ -446,11 +446,30 @@