谢杰标 2 år sedan
förälder
incheckning
f1867d1434

+ 5 - 0
src/pages/course-detail/index.vue

@@ -5381,6 +5381,7 @@ export default {
                   moduleId: section.moduleId || 0,
                   sectionId: section.sectionId || 0,
                   examId: section.typeId,
+                  learning: section.learning,
                   type: type,
                   chapterId: section.chapterId || 0,
                   orderGoodsId: this.orderGoodsId,
@@ -5397,6 +5398,7 @@ export default {
                   moduleId: section.moduleId || 0,
                   sectionId: section.sectionId || 0,
                   examId: section.typeId,
+                  learning: section.learning,
                   type: type,
                   chapterId: section.chapterId || 0,
                   orderGoodsId: this.orderGoodsId,
@@ -5470,6 +5472,7 @@ export default {
                   moduleId: section.moduleId || 0,
                   sectionId: section.sectionId || 0,
                   examId: section.typeId,
+                  learning: section.learning,
                   type: type,
                   chapterId: section.chapterId || 0,
                   orderGoodsId: this.orderGoodsId,
@@ -5485,6 +5488,7 @@ export default {
                   moduleId: section.moduleId || 0,
                   sectionId: section.sectionId || 0,
                   examId: section.typeId,
+                  learning: section.learning,
                   type: type,
                   chapterId: section.chapterId || 0,
                   orderGoodsId: this.orderGoodsId,
@@ -5538,6 +5542,7 @@ export default {
                 moduleId: section.moduleId || 0,
                 sectionId: section.sectionId || 0,
                 examId: section.typeId,
+                learning: section.learning,
                 type: type,
                 chapterId: section.chapterId || 0,
                 orderGoodsId: this.orderGoodsId,

+ 3 - 1
src/pages/course-exam/index.vue

@@ -1194,6 +1194,7 @@ export default {
       allTimes: 0, //总考试时长
       lastCount: 0,
       examId: 0,
+      learning: 0,
       goodsId: 0,
       courseId: 0,
       gradeId: 0,
@@ -1219,6 +1220,7 @@ export default {
   async mounted() {
     this.goodsId = this.$route.params.goodsId;
     this.examId = this.$route.query.examId;
+    this.learning = this.$route.query.learning;
     this.type = this.$route.query.type;
     this.courseId = this.$route.query.courseId;
     this.gradeId = this.$route.query.gradeId;
@@ -1730,7 +1732,7 @@ export default {
           .then((res) => {
             this.recordId = res.data;
             //  节不需要拍照
-            if (self.needPhoto && this.type != 2) {
+            if (self.needPhoto && this.type != 2 && this.learning != 1) {
               this.openPhoto();
             } else {
               if (this.lastTime) {

+ 116 - 108
src/pages/person-center/my-course/index.vue

@@ -987,135 +987,137 @@ export default {
     getRecord(item) {
       this.$request.studyrecordgetUserStudyLast().then(async (res) => {
         // if (res.data && res.data.sectionId) {
-          await this.getGoodsData(res);
-          var stop = false;
-          for (let y = 0; y < this.goodsTeacher.length; y++) {
-            for (let i = 0; i < this.goodsTeacher[y].courseList.length; i++) {
-              if (stop) {
-                break;
-              }
-              if (
-                this.goodsTeacher[y].courseList[i].courseId == res.data.courseId
+        await this.getGoodsData(res);
+        var stop = false;
+        for (let y = 0; y < this.goodsTeacher.length; y++) {
+          for (let i = 0; i < this.goodsTeacher[y].courseList.length; i++) {
+            if (stop) {
+              break;
+            }
+            if (
+              this.goodsTeacher[y].courseList[i].courseId == res.data.courseId
+            ) {
+              await this.changeStatus(this.goodsTeacher[y].courseList[i]);
+              for (
+                let k = 0;
+                k < this.goodsTeacher[y].courseList[i].children.length;
+                k++
               ) {
-                await this.changeStatus(this.goodsTeacher[y].courseList[i]);
-                for (
-                  let k = 0;
-                  k < this.goodsTeacher[y].courseList[i].children.length;
-                  k++
-                ) {
-                  if (res.data.moduleId) {
-                    console.log(1);
-                    if (
-                      this.goodsTeacher[y].courseList[i].children[k].menuId ==
-                      res.data.moduleId
+                if (res.data.moduleId) {
+                  console.log(1);
+                  if (
+                    this.goodsTeacher[y].courseList[i].children[k].menuId ==
+                    res.data.moduleId
+                  ) {
+                    await this.changeModuleStatus(
+                      this.goodsTeacher[y].courseList[i].children[k],
+                      i,
+                      k,
+                      y
+                    );
+                    for (
+                      let j = 0;
+                      j <
+                      this.goodsTeacher[y].courseList[i].children[k].children
+                        .length;
+                      j++
                     ) {
-                      await this.changeModuleStatus(
-                        this.goodsTeacher[y].courseList[i].children[k],
-                        i,
-                        k,
-                        y
-                      );
-                      for (
-                        let j = 0;
-                        j <
-                        this.goodsTeacher[y].courseList[i].children[k].children
-                          .length;
-                        j++
+                      if (
+                        this.goodsTeacher[y].courseList[i].children[k].children[
+                          j
+                        ].chapterId == res.data.chapterId
                       ) {
-                        if (
+                        await this.changeChapterStatus(
+                          y,
+                          2,
                           this.goodsTeacher[y].courseList[i].children[k]
-                            .children[j].chapterId == res.data.chapterId
-                        ) {
-                          await this.changeChapterStatus(
-                            y,
-                            2,
-                            this.goodsTeacher[y].courseList[i].children[k]
-                              .children[j],
-                            i,
-                            k,
-                            j
-                          );
+                            .children[j],
+                          i,
+                          k,
+                          j
+                        );
 
-                          for (
-                            let m = 0;
-                            m <
+                        for (
+                          let m = 0;
+                          m <
+                          this.goodsTeacher[y].courseList[i].children[k]
+                            .children[j].children.length;
+                          m++
+                        ) {
+                          if (
                             this.goodsTeacher[y].courseList[i].children[k]
-                              .children[j].children.length;
-                            m++
+                              .children[j].children[m].sectionId ==
+                            res.data.sectionId
                           ) {
-                            if (
+                            this.$set(
                               this.goodsTeacher[y].courseList[i].children[k]
-                                .children[j].children[m].sectionId ==
-                              res.data.sectionId
-                            ) {
-                              this.$set(
-                                this.goodsTeacher[y].courseList[i].children[k]
-                                  .children[j].children[m],
-                                "recordStatus",
-                                true
-                              );
-                              stop = true;
-                              break;
-                            }
+                                .children[j].children[m],
+                              "recordStatus",
+                              true
+                            );
+                            stop = true;
+                            break;
                           }
                         }
                       }
                     }
-                  } else if (res.data.chapterId) {
-                    console.log(2);
-                    if (
-                      this.goodsTeacher[y].courseList[i].children[k].menuId ==
-                      res.data.chapterId
+                  }
+                } else if (res.data.chapterId) {
+                  console.log(2);
+                  if (
+                    this.goodsTeacher[y].courseList[i].children[k].menuId ==
+                    res.data.chapterId
+                  ) {
+                    await this.changeChapterStatus(
+                      y,
+                      1,
+                      this.goodsTeacher[y].courseList[i].children[k],
+                      i,
+                      k
+                    );
+                    for (
+                      let j = 0;
+                      j <
+                      this.goodsTeacher[y].courseList[i].children[k].children
+                        .length;
+                      j++
                     ) {
-                      await this.changeChapterStatus(
-                        y,
-                        1,
-                        this.goodsTeacher[y].courseList[i].children[k],
-                        i,
-                        k
-                      );
-                      for (
-                        let j = 0;
-                        j <
-                        this.goodsTeacher[y].courseList[i].children[k].children
-                          .length;
-                        j++
+                      if (
+                        this.goodsTeacher[y].courseList[i].children[k].children[
+                          j
+                        ].sectionId == res.data.sectionId
                       ) {
-                        if (
+                        this.$set(
                           this.goodsTeacher[y].courseList[i].children[k]
-                            .children[j].sectionId == res.data.sectionId
-                        ) {
-                          this.$set(
-                            this.goodsTeacher[y].courseList[i].children[k]
-                              .children[j],
-                            "recordStatus",
-                            true
-                          );
-                          stop = true;
-                          break;
-                        }
+                            .children[j],
+                          "recordStatus",
+                          true
+                        );
+                        stop = true;
+                        break;
                       }
                     }
-                  } else {
-                    console.log(3);
-                    if (
-                      this.goodsTeacher[y].courseList[i].children[k].menuId ==
-                      res.data.sectionId
-                    ) {
-                      this.$set(
-                        this.goodsTeacher[y].courseList[i].children[k],
-                        "recordStatus",
-                        true
-                      );
-                      stop = true;
-                      break;
-                    }
+                  }
+                } else {
+                  console.log(3);
+                  if (
+                    this.goodsTeacher[y].courseList[i].children[k].menuId ==
+                    res.data.sectionId
+                  ) {
+                    this.$set(
+                      this.goodsTeacher[y].courseList[i].children[k],
+                      "recordStatus",
+                      true
+                    );
+                    stop = true;
+                    break;
                   }
                 }
               }
             }
           }
-          
+        }
+
         // } else {
         //   this.resultCourseGoodsList();
         // }
@@ -1423,7 +1425,7 @@ export default {
     },
     async getResource(courseLists, section, type, flag) {
       //type:1章卷,2节卷,3模考卷,4习题
-
+      
       if (!this.checkCanLearn()) {
         return false;
       }
@@ -1478,6 +1480,7 @@ export default {
                   moduleId: section.moduleId || 0,
                   sectionId: section.sectionId || 0,
                   examId: section.typeId,
+                  learning: section.learning,
                   type: type,
                   chapterId: section.chapterId || 0,
                   orderGoodsId: this.goodsData.orderGoodsId,
@@ -1494,6 +1497,7 @@ export default {
                   moduleId: section.moduleId || 0,
                   sectionId: section.sectionId || 0,
                   examId: section.typeId,
+                  learning: section.learning,
                   type: type,
                   chapterId: section.chapterId || 0,
                   orderGoodsId: this.goodsData.orderGoodsId,
@@ -1568,6 +1572,7 @@ export default {
                   moduleId: section.moduleId || 0,
                   sectionId: section.sectionId || 0,
                   examId: section.typeId,
+                  learning: section.learning,
                   type: type,
                   chapterId: section.chapterId || 0,
                   orderGoodsId: this.goodsData.orderGoodsId,
@@ -1583,6 +1588,7 @@ export default {
                   moduleId: section.moduleId || 0,
                   sectionId: section.sectionId || 0,
                   examId: section.typeId,
+                  learning: section.learning,
                   type: type,
                   chapterId: section.chapterId || 0,
                   orderGoodsId: this.goodsData.orderGoodsId,
@@ -1621,6 +1627,7 @@ export default {
                 moduleId: section.moduleId || 0,
                 sectionId: section.sectionId || 0,
                 examId: section.typeId,
+                learning: section.learning,
                 type: type,
                 chapterId: section.chapterId || 0,
                 orderGoodsId: this.goodsData.orderGoodsId,
@@ -1637,6 +1644,7 @@ export default {
                 moduleId: section.moduleId || 0,
                 sectionId: section.sectionId || 0,
                 examId: section.typeId,
+                learning: section.learning,
                 type: type,
                 chapterId: section.chapterId || 0,
                 orderGoodsId: this.goodsData.orderGoodsId,