课程停用或删除限制控制

This commit is contained in:
daihh
2022-10-24 18:01:08 +08:00
parent 0f8bf9432e
commit 81a2f6b06c
2 changed files with 22 additions and 6 deletions

View File

@@ -1027,6 +1027,10 @@
$this.$message.error('课程内容已删除或课程已不再使用');
return;
}
// if(!rs.result.course.enabled){
// $this.$message.error('十分抱歉,此课程已停用,如需使用,请联系管理员。');
// return;
// }
//设置必须的字段
if(rs.result.contents.length==1){
$this.tab=2;
@@ -1144,12 +1148,18 @@
}
} else {
this.$message.error('您还未报名');
// if (this.courseInfo.type == 10) {
// location.href = this.webBaseUrl + '/course/micro?id=' + this.courseId;
// } else {
location.href = this.webBaseUrl + '/course/detail?id=' + this.courseId;
// }
if(!$this.courseInfo.enabled || $this.courseInfo.deleted){
$this.$message.error('十分抱歉,此课程已停用,如需使用,请联系管理员。');
location.href = this.webBaseUrl + '/course/detail?id=' + this.courseId;
}else{
this.$message.error('您还未报名');
// if (this.courseInfo.type == 10) {
// location.href = this.webBaseUrl + '/course/micro?id=' + this.courseId;
// } else {
location.href = this.webBaseUrl + '/course/detail?id=' + this.courseId;
// }
}
}
} else {
this.$message.error(res.message);