mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-portal.git
synced 2025-12-09 02:46:44 +08:00
时间3秒
This commit is contained in:
@@ -24,6 +24,7 @@
|
||||
height="100%"
|
||||
@waiting="onWaiting"
|
||||
@playing="onPlaying"
|
||||
@timeupdate="onAudioTimeUpdate"
|
||||
>
|
||||
<source :src="src" />
|
||||
</video>
|
||||
@@ -561,6 +562,10 @@ export default {
|
||||
this.isPlaying = true;
|
||||
this.videoDom.play();
|
||||
},
|
||||
onAudioTimeUpdate() {
|
||||
const currentTime = this.$refs.video.currentTime;
|
||||
this.$emit('onTimeUpdate', currentTime);
|
||||
},
|
||||
},
|
||||
watch: {
|
||||
currentVolume: function () {
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
<videoPlayer ref="myVideoPlayer" id="myVideoPlayer" :src="blobUrl" @onPlayerPlaying="onPlayerPlaying"
|
||||
:initTime="contentData.lastStudyTime" :notePlay="notePlay" @onPlayerPlay="onPlayerPlay"
|
||||
:isDrag="curriculumData.isDrag" @onFullscreen="onFullscreen" @onPlayerPause="onPlayerPause"
|
||||
@onPlayerEnded="onPlayerEnded" :isCrowd="isCrowd"></videoPlayer>
|
||||
@onPlayerEnded="onPlayerEnded" :isCrowd="isCrowd" @onTimeUpdate="handleAudioTimeUpdate"></videoPlayer>
|
||||
<div class="player-box" v-if="playerBoxShow">
|
||||
<div class="player-praise" style="cursor: pointer;">
|
||||
<div @click="praiseContent">
|
||||
@@ -320,6 +320,7 @@
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
trueFalse: true,
|
||||
audiences:'',
|
||||
isCrowd:false,
|
||||
cutOrgNamePath,
|
||||
@@ -444,6 +445,7 @@
|
||||
}
|
||||
treeList.push(treeNode);
|
||||
});
|
||||
console.log(treeList,'treeList')
|
||||
return treeList;
|
||||
}
|
||||
},
|
||||
@@ -1188,6 +1190,7 @@
|
||||
audiences:this.audiences
|
||||
}).then(rs => {
|
||||
if (rs.status == 200) {
|
||||
this.contentStudysLength = rs.result.contentStudys
|
||||
if(rs.result.contents.length==0){
|
||||
$this.$message.error('课程内容已删除或课程已不再使用');
|
||||
return;
|
||||
@@ -1582,7 +1585,25 @@
|
||||
},
|
||||
heartabtwo() {
|
||||
this.tab = 2
|
||||
},
|
||||
handleAudioTimeUpdate(currentTime) {
|
||||
if(this.contentStudysLength.length == 0){
|
||||
let params = {
|
||||
studyId: this.studyId, //学习id,
|
||||
courseId: this.courseId, //课程id,
|
||||
contentId: this.contentData.id, //内容id,
|
||||
contentType: this.contentData.contentType,
|
||||
contentName: this.contentData.contentName, //内容名称
|
||||
progress: 100,
|
||||
status: 9,
|
||||
contentTotal: this.totalContent
|
||||
};
|
||||
if(currentTime > 3&&this.trueFalse){
|
||||
apiStudy.studyContent(params)
|
||||
this.trueFalse = false
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user