From 5f199931cafb23ca1a0c94cde02f41074ee190b7 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E5=B0=8F=E5=BC=A0?= <2091066548@qq.com>
Date: Tue, 2 Sep 2025 16:29:25 +0800
Subject: [PATCH] =?UTF-8?q?feat=EF=BC=9Aai=E4=BC=B4=E5=AD=A6=E6=99=AE?=
=?UTF-8?q?=E9=80=9A=E5=8C=BA=E5=88=86=E8=B0=83=E6=95=B4?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/views/AICompanion.vue | 163 ++++++++++++++++++++++++++++++--------
1 file changed, 132 insertions(+), 31 deletions(-)
diff --git a/src/views/AICompanion.vue b/src/views/AICompanion.vue
index bc40c03..1738bba 100644
--- a/src/views/AICompanion.vue
+++ b/src/views/AICompanion.vue
@@ -45,40 +45,70 @@
-
-
-

-
-
-
-
-
完整课程内容,需使用智点兑换
-
-
-
-
-
- 共9章54节
-
-
-
- 12小时43分钟
-
+
+
+
+
+
-
-
-
-
-
+
+
+
完整课程内容,需使用智点兑换
-
-
-
您的智点:101.5
-
获取更多智点 >>
-
+
+
+
+
+ 共9章54节
+
+
+
+ 12小时43分钟
+
+
+
+
+
+
+
+
+
+
+
+
您的智点:101.5
+
获取更多智点 >>
+
+
+
+
+
+
+
+
{{ (course as any)?.name || course?.title || '课程名称' }}
+
+
+
+
+
+ 共9章54节
+
+
+
+ 12小时43分钟
+
+
+
+
+
+
+
+
+
@@ -1172,6 +1202,7 @@ const loadCourseDetail = async () => {
if (response.code === 0 || response.code === 200) {
course.value = response.data
console.log('课程数据设置成功:', course.value)
+ console.log('课程AI模式:', (course.value as any)?.izAi)
// 确保讲师和时长信息正确显示
if (course.value) {
@@ -1595,6 +1626,19 @@ const handleExchangeCourse = () => {
enrollConfirmVisible.value = true
}
+// 处理普通模式课程报名
+const handleEnrollCourse = () => {
+ if (!userStore.isLoggedIn) {
+ // 未登录,显示登录弹窗
+ showLoginModal()
+ return
+ }
+
+ // 显示报名确认弹窗
+ console.log('用户点击报名课程')
+ enrollConfirmVisible.value = true
+}
+
// 测试直接API调用
// const testDirectApiCall = async () => {
// console.log('=== 开始测试直接API调用 ===')
@@ -4674,4 +4718,61 @@ onMounted(() => {
.no-comments {
color: #999;
}
+
+/* 普通模式样式 */
+.normal-course-info {
+ text-align: center;
+ margin-bottom: 24px;
+}
+
+.normal-main-message {
+ color: white;
+ font-size: 20px;
+ font-weight: 600;
+ margin-bottom: 20px;
+ line-height: 1.4;
+}
+
+.enroll-button-container {
+ text-align: center;
+ margin-bottom: 24px;
+}
+
+.enroll-button {
+ width: 112px;
+ height: 42px;
+ background: #0088D1;
+ border: 1px solid #0088D1;
+ border-radius: 2px;
+ cursor: pointer;
+ transition: all 0.3s ease;
+ display: inline-flex;
+ align-items: center;
+ justify-content: center;
+ padding: 0;
+}
+
+.enroll-button span {
+ width: 64px;
+ height: 22px;
+ font-family: PingFangSC, PingFang SC;
+ font-weight: 400;
+ font-size: 16px;
+ color: #FFFFFF;
+ line-height: 22px;
+ text-align: center;
+ font-style: normal;
+ text-transform: none;
+ white-space: nowrap;
+}
+
+.enroll-button:hover {
+ background: #0077B8;
+ border-color: #0077B8;
+}
+
+.enroll-button:active {
+ background: #006BA1;
+ border-color: #006BA1;
+}
\ No newline at end of file