-
@@ -652,6 +652,8 @@
} else {
this.blobUrl = process.env.VUE_APP_BASE_API + '/xboe/m/course/cware/resource?sign=' + urlSign;
}
+ console.log('this.contentData.id:',this.contentData.id)
+ this.blobId = this.contentData.id
//console.log(this.blobUrl,'this.blobUrl');
},
widthOpen(url) {
@@ -814,6 +816,28 @@
$this.controlHeight=h-95;
//console.log(h,$this.controlHeight,'$this.controlHeight');
})
+
+
+ console.log('this.contentData11:',this.contentData,this.curriculumData)
+ // 视频设置禁用处理逻辑,如果用户已全部观看完该视频,则设置为能全部拖动的逻辑,把isDrag设置为true即可,同时删除本地存储的数据
+ if(this.contentData.progressVideo ===1){
+ var obj = JSON.parse(this.contentData.content)
+ obj.isDrag = true
+ this.contentData.content = JSON.stringify(obj)
+ this.curriculumData.isDrag = true
+ var time = localStorage.getItem('videoProgressData')
+ var arr = time&&JSON.parse(time) || {}
+ //alert(con.progressVideo+'--'+con.id + '--'+JSON.stringify(arr))
+ delete arr[this.contentData.id];
+ localStorage.setItem('videoProgressData',JSON.stringify(arr))
+ }
+ if(this.contentData.progressVideo>0 && this.contentData.progressVideo !==1){
+ var time = localStorage.getItem('videoProgressData')
+ var arr = time&&JSON.parse(time) || {}
+ arr[this.contentData.id] = this.contentData.progressVideo
+ localStorage.setItem('videoProgressData',JSON.stringify(arr))
+ }
+
},
isShowTime(){
if(this.isContentTypeTwo != this.contentData.contentType){
@@ -1205,6 +1229,16 @@
itemId: this.contentData.studyItemId,
videoTime: intTime
};
+ console.log('this.courseInfo:',this.contentData)
+ if(!this.curriculumData.isDrag && this.contentData.progressVideo !=1){
+ var time = localStorage.getItem('videoProgressData')
+ var arr = time&&JSON.parse(time) || {}
+ if(arr[this.blobId] && this.contentData.progressVideo
{
if (rs.status != 200) {
@@ -1247,6 +1281,16 @@
itemId: this.contentData.studyItemId,
videoTime: intTime
};
+ console.log('this.courseInfo:',this.contentData)
+ if(!this.curriculumData.isDrag && this.contentData.progressVideo !=1){
+ var time = localStorage.getItem('videoProgressData')
+ var arr = time&&JSON.parse(time) || {}
+ if(arr[this.blobId] && this.contentData.progressVideo {
if (rs.status != 200) {