lsc 2 lat temu
rodzic
commit
21e58cdc93
1 zmienionych plików z 8 dodań i 7 usunięć
  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));
           }
 
-          if (_chapAarry.length) {
-            if (chapindex > _unitIndex) {
-              this.isDelete = 2;
-              this.unitIndex--;
-            }
-          }
+          
 
           for (let i = 0; i < unitJson.length; i++) {
             if (
@@ -4513,7 +4508,13 @@ export default {
             //   continue;
             // } else
           }
-          if (
+          
+          if (_chapAarry.length) {
+            if (chapindex > _unitIndex) {
+              this.isDelete = 2;
+              this.unitIndex--;
+            }
+          }else if (
             _unitJson2[this.unitIndex].chapterInfo[0].chapterid !=
             _unitJson[this.unitIndex].chapterInfo[0].chapterid
           ) {