mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-portal.git
synced 2025-12-15 05:46:43 +08:00
课程学习页面调整
This commit is contained in:
@@ -45,7 +45,7 @@
|
|||||||
</span>
|
</span>
|
||||||
</span>
|
</span>
|
||||||
<div style="margin-top:10px" class="newcote-time" v-if="note.playTime"
|
<div style="margin-top:10px" class="newcote-time" v-if="note.playTime"
|
||||||
@click="onPlayVideo(note.playTime)">
|
@click="onPlayVideo(note.contentId,note.playTime)">
|
||||||
<img src="../../../public/images/coteplay.png" alt="">
|
<img src="../../../public/images/coteplay.png" alt="">
|
||||||
{{formatSeconds(note.playTime)}}
|
{{formatSeconds(note.playTime)}}
|
||||||
</div>
|
</div>
|
||||||
@@ -82,7 +82,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="newcote-bottom" v-if="notetab == 1 || isEdit">
|
<div class="newcote-bottom" v-if="notetab == 1 || isEdit">
|
||||||
<span style="cursor: pointer;" @click="videoLocation"> <img src="../../../public/images/playtime.png"
|
<span v-if="btnPlayTime" style="cursor: pointer;" @click="videoLocation"> <img src="../../../public/images/playtime.png"
|
||||||
alt=""> 视频位置</span>
|
alt=""> 视频位置</span>
|
||||||
<el-radio v-model="mynoteData.openType" :label="9">公开</el-radio>
|
<el-radio v-model="mynoteData.openType" :label="9">公开</el-radio>
|
||||||
<el-radio v-model="mynoteData.openType" :label="1">私密</el-radio>
|
<el-radio v-model="mynoteData.openType" :label="1">私密</el-radio>
|
||||||
@@ -120,13 +120,14 @@ export default {
|
|||||||
isEdit:false,
|
isEdit:false,
|
||||||
courseId:'',
|
courseId:'',
|
||||||
inAnimation: false,
|
inAnimation: false,
|
||||||
|
btnPlayTime:false,//是否显示添加视频时间
|
||||||
radio: '1',
|
radio: '1',
|
||||||
notetab: 1,
|
notetab: 1,
|
||||||
autoSave: null,
|
autoSave: null,
|
||||||
mynoteData: {
|
mynoteData: {
|
||||||
type: 1, //我发布的是1 我导入的是2
|
type: 1, //我发布的是1 我导入的是2
|
||||||
content: '',
|
content: '',
|
||||||
playTime: '',
|
playTime: 0,
|
||||||
courseId: '',// 课程id
|
courseId: '',// 课程id
|
||||||
contentId: '',//课程内容id
|
contentId: '',//课程内容id
|
||||||
courseName: '',// 课程名称
|
courseName: '',// 课程名称
|
||||||
@@ -155,13 +156,14 @@ export default {
|
|||||||
// this.mynoteData.contentId = this.data.id;
|
// this.mynoteData.contentId = this.data.id;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
intTimeNote(val) {
|
// intTimeNote(val) {
|
||||||
this.mynoteData.playTime = val;
|
// this.mynoteData.playTime = val;
|
||||||
}
|
// }
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
onPlayVideo(time) {
|
onPlayVideo(conId,time) {
|
||||||
this.$emit('onPlayVideo', time);
|
//这里应该加上内容的id
|
||||||
|
this.$emit('onPlayVideo',conId,time);
|
||||||
},
|
},
|
||||||
formatSeconds(value) {
|
formatSeconds(value) {
|
||||||
let result = parseInt(value)
|
let result = parseInt(value)
|
||||||
@@ -177,6 +179,14 @@ export default {
|
|||||||
}
|
}
|
||||||
return res;
|
return res;
|
||||||
},
|
},
|
||||||
|
showVideoTimeBtn(showOrHidden){
|
||||||
|
this.btnPlayTime=showOrHidden;
|
||||||
|
},
|
||||||
|
//设置音视频的时间,引用页面调用
|
||||||
|
setVideoTime(contentId,time){
|
||||||
|
this.mynoteData.contentId=contentId;//内容id
|
||||||
|
this.mynoteData.playTime=time;//秒
|
||||||
|
},
|
||||||
timeDel() {
|
timeDel() {
|
||||||
this.mynoteData.playTime = 0;
|
this.mynoteData.playTime = 0;
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -65,7 +65,7 @@
|
|||||||
<div class="con-audio">
|
<div class="con-audio">
|
||||||
<div class="con-audio-title">{{ contentData.contentName }}</div>
|
<div class="con-audio-title">{{ contentData.contentName }}</div>
|
||||||
<div class="con-audio-player">
|
<div class="con-audio-player">
|
||||||
<audioPlayer v-if="resType == 20" :url="fileBaseUrl + curriculumData.url"
|
<audioPlayer v-if="resType == 20" :url="blobUrl"
|
||||||
:name="contentData.contentName" @onPlaying="audioPlaying" :isDrag="curriculumData.isDrag"
|
:name="contentData.contentName" @onPlaying="audioPlaying" :isDrag="curriculumData.isDrag"
|
||||||
@onPlay="audioPlay" @onPause="audioPause" @onPlayEnd="audioEnd"></audioPlayer>
|
@onPlay="audioPlay" @onPause="audioPause" @onPlayEnd="audioEnd"></audioPlayer>
|
||||||
</div>
|
</div>
|
||||||
@@ -140,7 +140,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<!-- 我的笔记 -->
|
<!-- 我的笔记 -->
|
||||||
<div class="mynote" v-show="tab == 2">
|
<div class="mynote" v-show="tab == 2">
|
||||||
<my-note :data="courseInfo" @videoLocation="videoLocation" @onPlayVideo="onPlayVideo"
|
<my-note ref="mynote" :data="courseInfo" @videoLocation="videoLocation" @onPlayVideo="onPlayVideo"
|
||||||
:score="courseInfo.score"></my-note>
|
:score="courseInfo.score"></my-note>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -378,7 +378,8 @@
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
onPlayVideo(time){
|
onPlayVideo(contentId,time){
|
||||||
|
//这里需要根据contentId,是否切换到对应的内容的视频的时间
|
||||||
this.playerBoxShow = false;
|
this.playerBoxShow = false;
|
||||||
this.notePlay = null;
|
this.notePlay = null;
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
@@ -387,7 +388,9 @@
|
|||||||
},
|
},
|
||||||
// 笔记功能
|
// 笔记功能
|
||||||
videoLocation() { // 记录笔记视频位置
|
videoLocation() { // 记录笔记视频位置
|
||||||
this.$store.dispatch("SetIntTimeNote", this.intTimeNote);
|
//this.$store.dispatch("SetIntTimeNote", this.intTimeNote);
|
||||||
|
console.log(this.contentData.id+'='+this.intTimeNote,'设置视频播放时间')
|
||||||
|
this.$refs.mynote.setVideoTime(this.contentData.id,this.intTimeNote);
|
||||||
},
|
},
|
||||||
coutab(n) {
|
coutab(n) {
|
||||||
this.courestab =n;
|
this.courestab =n;
|
||||||
@@ -406,7 +409,7 @@
|
|||||||
} else {
|
} else {
|
||||||
this.blobUrl = process.env.VUE_APP_BASE_API + '/xboe/m/course/cware/resource?sign=' + urlSign;
|
this.blobUrl = process.env.VUE_APP_BASE_API + '/xboe/m/course/cware/resource?sign=' + urlSign;
|
||||||
}
|
}
|
||||||
//console.log(this.blobUrl,'this.blobUrl');
|
console.log(this.blobUrl,'this.blobUrl');
|
||||||
},
|
},
|
||||||
widthOpen(url) {
|
widthOpen(url) {
|
||||||
window.open(url, '_blank');
|
window.open(url, '_blank');
|
||||||
@@ -458,6 +461,7 @@
|
|||||||
|
|
||||||
this.playerBoxShow = false;
|
this.playerBoxShow = false;
|
||||||
//显示内容部分
|
//显示内容部分
|
||||||
|
this.$refs.mynote.showVideoTimeBtn(false);
|
||||||
let $this = this;
|
let $this = this;
|
||||||
this.resType = r.contentType;
|
this.resType = r.contentType;
|
||||||
this.contentData = r;
|
this.contentData = r;
|
||||||
@@ -470,6 +474,7 @@
|
|||||||
} else {
|
} else {
|
||||||
this.curriculumData.url = r.content;
|
this.curriculumData.url = r.content;
|
||||||
}
|
}
|
||||||
|
this.$refs.mynote.showVideoTimeBtn(true);
|
||||||
//let url=process.env.VUE_APP_BASE_API+'/xboe/m/course/file/show?cf='+this.curriculumData.url;
|
//let url=process.env.VUE_APP_BASE_API+'/xboe/m/course/file/show?cf='+this.curriculumData.url;
|
||||||
//let url=this.fileBaseUrl+this.curriculumData.url;
|
//let url=this.fileBaseUrl+this.curriculumData.url;
|
||||||
this.createPlayUrl(r.contentRefId, this.curriculumData.url);
|
this.createPlayUrl(r.contentRefId, this.curriculumData.url);
|
||||||
|
|||||||
Reference in New Issue
Block a user