lsc 2 年之前
父节点
当前提交
21e58cdc93
共有 1 个文件被更改,包括 8 次插入7 次删除
  1. 8 7
      src/components/pages/addCourse.vue

+ 8 - 7
src/components/pages/addCourse.vue

@@ -4487,12 +4487,7 @@ export default {
             _unitJson = JSON.parse(JSON.stringify(_unitJson2));
             _unitJson = JSON.parse(JSON.stringify(_unitJson2));
           }
           }
 
 
-          if (_chapAarry.length) {
-            if (chapindex > _unitIndex) {
-              this.isDelete = 2;
-              this.unitIndex--;
-            }
-          }
+          
 
 
           for (let i = 0; i < unitJson.length; i++) {
           for (let i = 0; i < unitJson.length; i++) {
             if (
             if (
@@ -4513,7 +4508,13 @@ export default {
             //   continue;
             //   continue;
             // } else
             // } else
           }
           }
-          if (
+          
+          if (_chapAarry.length) {
+            if (chapindex > _unitIndex) {
+              this.isDelete = 2;
+              this.unitIndex--;
+            }
+          }else if (
             _unitJson2[this.unitIndex].chapterInfo[0].chapterid !=
             _unitJson2[this.unitIndex].chapterInfo[0].chapterid !=
             _unitJson[this.unitIndex].chapterInfo[0].chapterid
             _unitJson[this.unitIndex].chapterInfo[0].chapterid
           ) {
           ) {