feat:对接ai伴学普通和ai伴学模式
This commit is contained in:
parent
5f199931ca
commit
f0320a021d
@ -244,8 +244,10 @@ export class CourseApi {
|
|||||||
isEnrolled: false,
|
isEnrolled: false,
|
||||||
progress: 0,
|
progress: 0,
|
||||||
createdAt: this.formatTimestamp(item.createTime),
|
createdAt: this.formatTimestamp(item.createTime),
|
||||||
updatedAt: this.formatTimestamp(item.updateTime)
|
updatedAt: this.formatTimestamp(item.updateTime),
|
||||||
}
|
// 添加AI伴学模式字段
|
||||||
|
izAi: item.izAi
|
||||||
|
} as any
|
||||||
|
|
||||||
return {
|
return {
|
||||||
code: 200,
|
code: 200,
|
||||||
@ -351,8 +353,10 @@ export class CourseApi {
|
|||||||
isEnrolled: false,
|
isEnrolled: false,
|
||||||
progress: 0,
|
progress: 0,
|
||||||
createdAt: this.formatTimestamp(item.createTime),
|
createdAt: this.formatTimestamp(item.createTime),
|
||||||
updatedAt: this.formatTimestamp(item.updateTime)
|
updatedAt: this.formatTimestamp(item.updateTime),
|
||||||
}
|
// 添加AI伴学模式字段
|
||||||
|
izAi: item.izAi
|
||||||
|
} as any
|
||||||
|
|
||||||
return {
|
return {
|
||||||
code: 200,
|
code: 200,
|
||||||
|
@ -319,6 +319,7 @@ export interface BackendCourseItem {
|
|||||||
maxEnroll: number
|
maxEnroll: number
|
||||||
status: number
|
status: number
|
||||||
question: string
|
question: string
|
||||||
|
izAi: number | null // AI伴学模式标识:1=AI伴学,0=普通模式,null=普通模式
|
||||||
createBy: string
|
createBy: string
|
||||||
createTime: string
|
createTime: string
|
||||||
updateBy: string
|
updateBy: string
|
||||||
|
@ -695,7 +695,8 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="ai-assistant-interface">
|
<!-- AI助手界面 - 仅在AI伴学模式下显示 -->
|
||||||
|
<div v-if="(course as any)?.izAi === 1" class="ai-assistant-interface">
|
||||||
<!-- <div class="banner-button">
|
<!-- <div class="banner-button">
|
||||||
<img src="/images/aiCompanion/切换@2x.png" alt="切换" class="button-icon-image">
|
<img src="/images/aiCompanion/切换@2x.png" alt="切换" class="button-icon-image">
|
||||||
<span class="button-text">普通</span>
|
<span class="button-text">普通</span>
|
||||||
@ -1588,6 +1589,7 @@ const loadCourseDetail = async () => {
|
|||||||
if (response.code === 0 || response.code === 200) {
|
if (response.code === 0 || response.code === 200) {
|
||||||
course.value = response.data
|
course.value = response.data
|
||||||
console.log('课程数据设置成功:', course.value)
|
console.log('课程数据设置成功:', course.value)
|
||||||
|
console.log('课程AI模式:', (course.value as any)?.izAi)
|
||||||
|
|
||||||
// 确保讲师和时长信息正确显示
|
// 确保讲师和时长信息正确显示
|
||||||
if (course.value) {
|
if (course.value) {
|
||||||
@ -6456,7 +6458,7 @@ onActivated(() => {
|
|||||||
justify-content: flex-end;
|
justify-content: flex-end;
|
||||||
gap: 12px;
|
gap: 12px;
|
||||||
padding-top: 24px;
|
padding-top: 24px;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.cancel-btn {
|
.cancel-btn {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user