mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-mobile.git
synced 2025-12-10 11:26:47 +08:00
fix: 调整 study 接口最大调用次数
This commit is contained in:
@@ -1927,14 +1927,32 @@ export default {
|
|||||||
status: 2,
|
status: 2,
|
||||||
contentTotal: this.totalContent
|
contentTotal: this.totalContent
|
||||||
}
|
}
|
||||||
apiCourseStudy.studyContent(params).then(res => {
|
|
||||||
if (res.status == 200) {
|
// apiCourseStudy.studyContent(params).then(res => {
|
||||||
this.curContent.status = 2;//完成
|
// if (res.status == 200) {
|
||||||
this.curContent.studyItemId = res.result;//学习记录id
|
// this.curContent.status = 2;//完成
|
||||||
} else {
|
// this.curContent.studyItemId = res.result;//学习记录id
|
||||||
console.log('记录学习失败:' + res.message + ',' + res.error);
|
// } else {
|
||||||
}
|
// console.log('记录学习失败:' + res.message + ',' + res.error);
|
||||||
})
|
// }
|
||||||
|
// })
|
||||||
|
this.studyContent(params)
|
||||||
|
},
|
||||||
|
studyContent(params) {
|
||||||
|
// 增加最大调用次数限制
|
||||||
|
this.countRequest = Number(this.countRequest) + 1
|
||||||
|
|
||||||
|
if (this.countRequest<3 ){
|
||||||
|
apiCourseStudy.studyContent(params).then(res => {
|
||||||
|
if (Number(res.status) === 200) {
|
||||||
|
this.curContent.status = 2;//完成
|
||||||
|
if (res.result)this.curContent.studyItemId = res.result;//学习记录id
|
||||||
|
else this.studyContent(params)
|
||||||
|
} else {
|
||||||
|
console.log('记录学习失败:' + res.message + ',' + res.error);
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
},
|
},
|
||||||
//还需要记录播放时间
|
//还需要记录播放时间
|
||||||
saveStudyInfo() { //记录课件学习信息
|
saveStudyInfo() { //记录课件学习信息
|
||||||
@@ -1957,14 +1975,15 @@ export default {
|
|||||||
status: 9,
|
status: 9,
|
||||||
contentTotal: this.totalContent
|
contentTotal: this.totalContent
|
||||||
}
|
}
|
||||||
apiCourseStudy.studyContent(params).then(res => {
|
// apiCourseStudy.studyContent(params).then(res => {
|
||||||
if (res.status == 200) {
|
// if (res.status == 200) {
|
||||||
this.curContent.status = 9;//完成
|
// this.curContent.status = 9;//完成
|
||||||
this.curContent.studyItemId = res.result;//学习记录id
|
// this.curContent.studyItemId = res.result;//学习记录id
|
||||||
} else {
|
// } else {
|
||||||
console.log('记录学习失败:' + res.message + ',' + res.error);
|
// console.log('记录学习失败:' + res.message + ',' + res.error);
|
||||||
}
|
// }
|
||||||
})
|
// })
|
||||||
|
this.studyContent(params)
|
||||||
},
|
},
|
||||||
statusClass(status) {
|
statusClass(status) {
|
||||||
let statusObj = {
|
let statusObj = {
|
||||||
|
|||||||
Reference in New Issue
Block a user