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:
@@ -184,6 +184,12 @@ export default {
|
|||||||
//页面只支取一次,所以先直接写在这里面
|
//页面只支取一次,所以先直接写在这里面
|
||||||
apiCoursePortal.detail(id,false).then(rs=>{
|
apiCoursePortal.detail(id,false).then(rs=>{
|
||||||
if(rs.status==200){
|
if(rs.status==200){
|
||||||
|
|
||||||
|
if(!rs.result.course.enabled || rs.result.course.deleted){
|
||||||
|
$this.$message.error('十分抱歉,此课程已停用,如需使用,请联系管理员。');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if(rs.result.teachers && rs.result.teachers.length > 0){
|
if(rs.result.teachers && rs.result.teachers.length > 0){
|
||||||
let userIds=[];
|
let userIds=[];
|
||||||
let ctoUsers=[];
|
let ctoUsers=[];
|
||||||
|
|||||||
@@ -1027,6 +1027,10 @@
|
|||||||
$this.$message.error('课程内容已删除或课程已不再使用');
|
$this.$message.error('课程内容已删除或课程已不再使用');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
// if(!rs.result.course.enabled){
|
||||||
|
// $this.$message.error('十分抱歉,此课程已停用,如需使用,请联系管理员。');
|
||||||
|
// return;
|
||||||
|
// }
|
||||||
//设置必须的字段
|
//设置必须的字段
|
||||||
if(rs.result.contents.length==1){
|
if(rs.result.contents.length==1){
|
||||||
$this.tab=2;
|
$this.tab=2;
|
||||||
@@ -1144,12 +1148,18 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
this.$message.error('您还未报名');
|
if(!$this.courseInfo.enabled || $this.courseInfo.deleted){
|
||||||
// if (this.courseInfo.type == 10) {
|
$this.$message.error('十分抱歉,此课程已停用,如需使用,请联系管理员。');
|
||||||
// location.href = this.webBaseUrl + '/course/micro?id=' + this.courseId;
|
location.href = this.webBaseUrl + '/course/detail?id=' + this.courseId;
|
||||||
// } else {
|
}else{
|
||||||
location.href = this.webBaseUrl + '/course/detail?id=' + this.courseId;
|
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 {
|
} else {
|
||||||
this.$message.error(res.message);
|
this.$message.error(res.message);
|
||||||
|
|||||||
Reference in New Issue
Block a user