mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-portal.git
synced 2025-12-11 03:46:44 +08:00
提交
This commit is contained in:
@@ -791,8 +791,9 @@ export default {
|
||||
//console.log(e);
|
||||
},
|
||||
showRes(r,i,index) {//i:子节下标,index:章下标
|
||||
if(i!=undefined && index!=undefined) {
|
||||
if(i!=undefined && index!=undefined && r.status<9) {
|
||||
if(this.courseInfo.orderStudy) {
|
||||
//判断上个是否学完
|
||||
if(i == 0) {
|
||||
if(index > 0) { //第一章 第一节
|
||||
let preCatalog=this.catalogTree[index-1];
|
||||
@@ -807,15 +808,32 @@ export default {
|
||||
if(pre.status!=9){
|
||||
this.$message.warning('请按顺序学习!');
|
||||
return;
|
||||
} else {
|
||||
if(this.completed.indexOf(pre.id) > 0) {
|
||||
}
|
||||
}
|
||||
//判断是否是第一个未学完的
|
||||
let isAllow=false;
|
||||
let has=this.catalogTree.some(treeNode=>{
|
||||
let hasNo=treeNode.children.some(child=>{
|
||||
if(child.status<9){
|
||||
if(child.id==r.id){
|
||||
isAllow=true;
|
||||
}
|
||||
return true;
|
||||
}else{
|
||||
return false;
|
||||
}
|
||||
|
||||
});
|
||||
return hasNo;
|
||||
});
|
||||
if(has){
|
||||
if(!isAllow){
|
||||
this.$message.warning('请按顺序学习!');
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
this.playerBoxShow=false;
|
||||
//显示内容部分
|
||||
|
||||
Reference in New Issue
Block a user