11wqe1 2 tháng trước cách đây
mục cha
commit
9e31f8e5a5

+ 8 - 5
src/components/easy2/studyStudent.vue

@@ -20650,7 +20650,8 @@ export default {
         this.chapInfoList[this.courseType].chapterInfo[0].taskJson[
           this.taskCount
         ].isLook = true;
-        this.addCourseState(3);
+        let yym = JSON.parse(JSON.stringify(this.chapInfoList))
+        this.addCourseState(3,yym);
       }
       for (var ci = 0; ci < this.isCloseList.length; ci++) {
         this.isCloseList[ci].isClose = 0;
@@ -21853,8 +21854,9 @@ export default {
           console.error(err);
         });
     },
-    addCourseState(type) {
-      let _state = this.chapInfoList;
+    addCourseState(type,val = '') {
+      
+      let _state = val ? val : this.chapInfoList;
       // this.courseType   this.taskCount
       if (type == 1 || type == 2) {
         for (var i = 0; i < _state.length; i++) {
@@ -21883,6 +21885,7 @@ export default {
           state: JSON.stringify(_state)
         }
       ];
+      
       this.ajax
         .post(
           this.$store.state.api +
@@ -25038,9 +25041,9 @@ export default {
   beforeDestroy() {
     window.onresize = null;
     clearInterval(this.timer);
-    clearInterval(this.timer2);
-
     this.timer = null;
+
+    clearInterval(this.timer2);
     this.timer2 = null;
 
     clearInterval(this.opertimer);

+ 6 - 3
src/components/easy3/studyStudent.vue

@@ -16432,7 +16432,9 @@ export default {
         this.chapInfoList[this.courseType].chapterInfo[0].taskJson[
           this.taskCount
         ].isLook = true;
-        this.addCourseState(3);
+
+        let yym = JSON.parse(JSON.stringify(this.chapInfoList))
+        this.addCourseState(3,yym);
       }
       for (var ci = 0; ci < this.isCloseList.length; ci++) {
         this.isCloseList[ci].isClose = 0;
@@ -17551,8 +17553,9 @@ export default {
           console.error(err);
         });
     },
-    addCourseState(type) {
-      let _state = this.chapInfoList;
+    addCourseState(type,val = '') {
+      let _state = val ? val : this.chapInfoList;
+
       // this.courseType   this.taskCount
       if (type == 1 || type == 2) {
         for (var i = 0; i < _state.length; i++) {

+ 6 - 4
src/components/studyStudent.vue

@@ -16356,7 +16356,6 @@ export default {
     },
 
     openTask(s, n, i,ctype) {
-			console.log(s, n, i,ctype)
       if (this.IsFollow && this.tType == 2) {
         this.$message.error("已经开启跟随模式,请认真跟堂听讲");
         return;
@@ -16421,8 +16420,10 @@ export default {
         this.chapInfoList[this.courseType].chapterInfo[0].taskJson[
           this.taskCount
         ].isLook = true;
-        this.addCourseState(3);
+        let yym = JSON.parse(JSON.stringify(this.chapInfoList))
+        this.addCourseState(3,yym);
       }
+
       for (let ci = 0; ci < this.isCloseList.length; ci++) {
         this.isCloseList[ci].isClose = 0;
         this.isCloseList[ci].isCloseBoolean = false;
@@ -17543,8 +17544,9 @@ export default {
           console.error(err);
         });
     },
-    addCourseState(type) {
-      let _state = this.chapInfoList;
+    addCourseState(type,val = '') {
+      let _state = val ? val : this.chapInfoList;
+
       // this.courseType   this.taskCount
       if (type == 1 || type == 2) {
         for (var i = 0; i < _state.length; i++) {

+ 5 - 3
src/components/studySutdentClass/studyStudent.vue

@@ -20092,7 +20092,8 @@ export default {
         this.chapInfoList[this.courseType].chapterInfo[0].taskJson[
           this.taskCount
         ].isLook = true;
-        this.addCourseState(3);
+        let yym = JSON.parse(JSON.stringify(this.chapInfoList))
+        this.addCourseState(3,yym);
       }
       for (var ci = 0; ci < this.isCloseList.length; ci++) {
         this.isCloseList[ci].isClose = 0;
@@ -21288,8 +21289,9 @@ export default {
           console.error(err);
         });
     },
-    addCourseState(type) {
-      let _state = this.chapInfoList;
+    addCourseState(type,val = '') {
+      let _state = val ? val : this.chapInfoList;
+
       // this.courseType   this.taskCount
       if (type == 1 || type == 2) {
         for (var i = 0; i < _state.length; i++) {