|
|
|
@ -413,7 +413,7 @@ export default { |
|
|
|
|
}, |
|
|
|
|
destroyed () { |
|
|
|
|
// 记录播放时长 |
|
|
|
|
Util.local.get(Setting.tokenKey) && this.$post(this.api.playRecordSave, { |
|
|
|
|
Util.local.get(Setting.tokenKey) && this.courseId && this.$post(this.api.playRecordSave, { |
|
|
|
|
courseId: this.courseId, |
|
|
|
|
courseType: 0, |
|
|
|
|
playTime: Math.ceil((Date.now() - this.startTime) / 1000 / 60) |
|
|
|
@ -429,23 +429,25 @@ export default { |
|
|
|
|
this.addRecord() |
|
|
|
|
}, |
|
|
|
|
async getData () { |
|
|
|
|
const { data } = await this.$post(`${this.api.curriculumDetail}?cid=${this.courseId}&mallId=${this.mallId}`); |
|
|
|
|
this.routes = [ |
|
|
|
|
{ |
|
|
|
|
name: '实验台', |
|
|
|
|
path: `list?keyword=${this.$route.query.keyword || ''}&active=${this.$route.query.active || 0}` |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
name: data.curriculumName |
|
|
|
|
} |
|
|
|
|
] |
|
|
|
|
|
|
|
|
|
this.courseName = data.curriculumName; |
|
|
|
|
this.briefIntroduction = data.briefIntroduction; |
|
|
|
|
this.teachingObjectives = data.teachingObjectives; |
|
|
|
|
this.assessmentList = data.assessmentConfig; |
|
|
|
|
this.systemIds = data.systemIds |
|
|
|
|
this.queryProject() |
|
|
|
|
if (this.courseId) { |
|
|
|
|
const { data } = await this.$post(`${this.api.curriculumDetail}?cid=${this.courseId}&mallId=${this.mallId}`); |
|
|
|
|
this.routes = [ |
|
|
|
|
{ |
|
|
|
|
name: '实验台', |
|
|
|
|
path: `list?keyword=${this.$route.query.keyword || ''}&active=${this.$route.query.active || 0}` |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
name: data.curriculumName |
|
|
|
|
} |
|
|
|
|
] |
|
|
|
|
|
|
|
|
|
this.courseName = data.curriculumName; |
|
|
|
|
this.briefIntroduction = data.briefIntroduction; |
|
|
|
|
this.teachingObjectives = data.teachingObjectives; |
|
|
|
|
this.assessmentList = data.assessmentConfig; |
|
|
|
|
this.systemIds = data.systemIds |
|
|
|
|
this.queryProject() |
|
|
|
|
} |
|
|
|
|
this.getStatus() |
|
|
|
|
}, |
|
|
|
|
// 记录最近使用 |
|
|
|
@ -465,20 +467,24 @@ export default { |
|
|
|
|
}, |
|
|
|
|
// 获取章节小节 |
|
|
|
|
async getChapter () { |
|
|
|
|
let res = await this.$get(`${this.api.curriculumChapter}/${this.courseId}`); |
|
|
|
|
this.chapterList = res.chapterList; |
|
|
|
|
if (this.chapterList.length && this.chapterList[0].subsectionList && this.chapterList[0].subsectionList.length && !this.commentId) { |
|
|
|
|
this.preview(this.chapterList[0].subsectionList[0], this.chapterList[0].name, 1); |
|
|
|
|
if (this.courseId) { |
|
|
|
|
let res = await this.$get(`${this.api.curriculumChapter}/${this.courseId}`); |
|
|
|
|
this.chapterList = res.chapterList; |
|
|
|
|
if (this.chapterList.length && this.chapterList[0].subsectionList && this.chapterList[0].subsectionList.length && !this.commentId) { |
|
|
|
|
this.preview(this.chapterList[0].subsectionList[0], this.chapterList[0].name, 1); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
// 获取学习进度 |
|
|
|
|
async getProgress () { |
|
|
|
|
let res = await this.$post(`${this.api.courseLearningProgress}?courseId=${this.courseId}&systemId=${this.systemIds}&mallId=${this.mallId}`); |
|
|
|
|
this.progressList = res.list |
|
|
|
|
if (res.list.length) this.archProject = res.list[0].projectId |
|
|
|
|
this.maximumScores.length || this.getMaximumScore() |
|
|
|
|
this.plan = res.plan |
|
|
|
|
this.schedule = +(res.schedule.replace('%', '')) |
|
|
|
|
if (this.courseId) { |
|
|
|
|
let res = await this.$post(`${this.api.courseLearningProgress}?courseId=${this.courseId}&systemId=${this.systemIds}&mallId=${this.mallId}`); |
|
|
|
|
this.progressList = res.list |
|
|
|
|
if (res.list.length) this.archProject = res.list[0].projectId |
|
|
|
|
this.maximumScores.length || this.getMaximumScore() |
|
|
|
|
this.plan = res.plan |
|
|
|
|
this.schedule = +(res.schedule.replace('%', '')) |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
// 获取最高分列表 |
|
|
|
|
async getMaximumScore () { |
|
|
|
|