课程停用或删除限制控制

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

@@ -184,6 +184,12 @@ export default {
//页面只支取一次,所以先直接写在这里面
apiCoursePortal.detail(id,false).then(rs=>{
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){
let userIds=[];
let ctoUsers=[];