Merge remote-tracking branch 'aliyun/player-20251117' into player-20251117

# Conflicts:
#	src/api/modules/course.js
#	src/views/study/coursenew.vue
This commit is contained in:
joshen
2025-12-09 18:06:39 +08:00
3 changed files with 3164 additions and 52 deletions

View File

@@ -782,6 +782,11 @@
@onPlayVideo="onPlayVideo"
:score="courseInfo.score"
></my-note>
</div>
<!-- ai播放器相关 -->
<!-- ai文稿 -->
<div class="ai-script" v-if="contentData.contentType == 10 && tab == 3">
<ai-script ref="aiscript" :blobId="blobId" :isDrag="curriculumData.isDrag" @changeCurrentTime="changeCurrentTime"></ai-script>
</div>
</div>
</div>
@@ -795,6 +800,16 @@
>
内容简介<span class=""></span>
</div>
<!-- ai播放器相关 -->
<div
@click="coutab(4)"
v-if="courseInfo.aiAbstract == 1"
style="position: relative;"
:class="courestab == 4 ? 'course-info-tab-active' : ''"
>
AI摘要<span class=""></span>
<img style="position: absolute;top: -18px;right: -23px;width: 36px;height: 24px;" src="@/assets/images/course/courseNew.png" alt="">
</div>
<div
@click="coutab(2)"
:class="courestab == 2 ? 'course-info-tab-active' : ''"
@@ -867,6 +882,15 @@
:obj-id="courseInfo.id"
:name="courseInfo.name"
></note-comments>
</div>
</div>
<!-- ai播放器相关 -->
<div
v-show="courestab == 4"
style="padding-left: 17px; padding-top: 20px;background-color: #fff;"
>
<div style="padding: 30px;line-height: 24px;letter-spacing: 0.3px;color: rgba(102, 102, 102, 1);">
{{ courseInfo.summaryContent || '' }}
</div>
</div>
</div>
@@ -961,7 +985,7 @@
</div>
</template>
<script>
import { mapGetters } from "vuex";
import { mapGetters, mapMutations } from "vuex";
import followButton from "@/components/Follow/button.vue";
import portalHeader from "@/components/PortalHeader.vue";
import portalFooter from "@/components/PortalFooter.vue";
@@ -998,6 +1022,7 @@
import homework from "@/components/Course/homework";
import assess from "@/components/Course/assess";
import myNote from "../../components/Course/myNote.vue";
import aiScript from "../../components/Course/aiScript.vue";
import apiFollow from "@/api/phase2/userfollow.js";
import apiMessage from "@/api/system/message.js";
// import Vue from 'vue';
@@ -1017,6 +1042,7 @@
audioPlayer,
videoPlayer,
myNote,
aiScript,
noteComments,
portalFooter,
followButton,
@@ -1115,6 +1141,7 @@
warn: "测试内容",
warnTitle: "测试标题",
isFinishingStudyItem: false, // 防止重复调用完成状态更新接口
newEmployee: false
};
},
mounted() {
@@ -1131,7 +1158,8 @@
this.loadData();
},
computed: {
...mapGetters(["userInfo"]),
// ai播放器相关
...mapGetters(["userInfo", 'selectableLang']),
catalogTree() {
let treeList = [];
this.completed = [];
@@ -1167,6 +1195,16 @@
},
},
methods: {
// ai播放器相关
// 处理从AI文稿组件传递过来的时间跳转事件
changeCurrentTime(time) {
console.log(time,'time')
this.$refs.myVideoPlayer && this.$refs.myVideoPlayer.seekToTime(time);
},
...mapMutations({
SET_selectableLang: 'video/SET_selectableLang',
SET_courseInfo: 'video/SET_courseInfo',
}),
handleCancelScore() {
this.isShowScoreConfirm = false;
this.scoreInfo.score = 5;
@@ -1335,6 +1373,10 @@
this.curriculumData.url = r.content;
}
this.$refs.mynote.showVideoTimeBtn(true);
// ai播放器相关 - 视频类型加载ai相关功能
if (r.contentType == 10) {
this.handleAIVideo(r.boeaiSubtitleRspList, r);
}
this.createPlayUrl(r.contentRefId, this.curriculumData.url);
} else if (r.contentType == 40) {
// if (r.content != '' && r.content.indexOf('.pdf') == -1) {
@@ -1503,6 +1545,16 @@
}
this.contentData.status = 2;
},
// ai播放器相关 - 视频处理
handleAIVideo(list = [], r) {
console.log('触发了-----------list', list);
this.SET_selectableLang(list);
this.SET_courseInfo(this.courseInfo);
if (this.courseInfo.aiSet && this.courseInfo.aiAbstract == 1 && this.courseInfo.summaryContent) {
this.coutab(4);
}
console.log("ai处理", this.selectableLang);
},
showRes(r, i, index, item) {
//i:子节下标index:章下标
// 无权限查看不能点击
@@ -2460,6 +2512,10 @@
heartabtwo() {
this.tab = 2;
},
// ai播放器相关
heartabthree() {
this.tab = 3;
},
handleAudioTimeUpdate(currentTime) {
// if(this.contentStudysLength.length == 0){
let params = {