mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-portal.git
synced 2025-12-12 04:16:45 +08:00
还原视频状态 调试
This commit is contained in:
@@ -480,6 +480,7 @@
|
|||||||
defaultMaxTime:1800, //非音频默认最大时间
|
defaultMaxTime:1800, //非音频默认最大时间
|
||||||
warn:"测试内容",
|
warn:"测试内容",
|
||||||
warnTitle:"测试标题",
|
warnTitle:"测试标题",
|
||||||
|
isFinishingStudyItem: false, // 防止重复调用完成状态更新接口
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
@@ -1684,19 +1685,28 @@
|
|||||||
//这种可能没有,不过这里也是为了万中那个1
|
//这种可能没有,不过这里也是为了万中那个1
|
||||||
!this.tentative && this.saveStudyInfo();
|
!this.tentative && this.saveStudyInfo();
|
||||||
} else {
|
} else {
|
||||||
|
// 如果正在处理完成请求,则直接返回,避免重复调用
|
||||||
|
if (this.isFinishingStudyItem) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
let params = {
|
let params = {
|
||||||
itemId: this.contentData.studyItemId,
|
itemId: this.contentData.studyItemId,
|
||||||
studyId: this.studyId,
|
studyId: this.studyId,
|
||||||
courseId: this.courseId,
|
courseId: this.courseId,
|
||||||
cnum: this.totalContent
|
cnum: this.totalContent
|
||||||
}
|
}
|
||||||
this.contentData.status = 9;
|
this.isFinishingStudyItem = true; // 设置标志位
|
||||||
apiVideoStudy.finishStudyItem(params).then(res => {
|
apiVideoStudy.finishStudyItem(params).then(res => {
|
||||||
if (res.status == 200) {
|
if (res.status == 200) {
|
||||||
|
this.contentData.status = 9;
|
||||||
this.contentData.progress = 100;
|
this.contentData.progress = 100;
|
||||||
} else {
|
} else {
|
||||||
console.log("记录完成学习失败:" + res.message + "," + res.error);
|
console.log("记录完成学习失败:" + res.message + "," + res.error);
|
||||||
}
|
}
|
||||||
|
this.isFinishingStudyItem = false; // 重置标志位
|
||||||
|
}).catch(error => {
|
||||||
|
console.error("记录完成学习出错:", error);
|
||||||
|
this.isFinishingStudyItem = false; // 出错时也重置标志位
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user