Pārlūkot izejas kodu

orderGoodsId缺失补全

Tang 2 gadi atpakaļ
vecāks
revīzija
8fd146d55b

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

@@ -1554,7 +1554,6 @@ export default {
           .studyRecordMenuAllListWithExam({
             courseId: this.courseId,
             gradeId: this.gradeId,
-
             orderGoodsId: this.orderGoodsId,
             goodsId: this.goodsId
           })

+ 63 - 62
src/pages/course-report/index.vue

@@ -156,9 +156,7 @@
       <span slot="footer" class="dialog-footer">
         <el-button type="primary" @click="nextDialogStatus = false"
           >取消</el-button
-        ><el-button type="primary" @click="nextJump"
-          >确定</el-button
-        >
+        ><el-button type="primary" @click="nextJump">确定</el-button>
       </span>
     </el-dialog>
     <ToolBar></ToolBar>
@@ -182,7 +180,7 @@ export default {
   },
   data() {
     return {
-      nextDialogStatus:false,
+      nextDialogStatus: false,
       examId: "",
       courseList: [],
       pageNum: 1,
@@ -191,7 +189,7 @@ export default {
       recordId: "",
       type: 0, //type:1章卷,2节卷,3模考卷
       reportdata: {},
-      studyItem:{}
+      studyItem: {}
     };
   },
   computed: {
@@ -225,7 +223,8 @@ export default {
           .studyRecordMenuAllListWithExam({
             courseId: item.courseId,
             gradeId: item.gradeId,
-            goodsId: item.goodsId
+            goodsId: item.goodsId,
+            orderGoodsId: item.orderGoodsId
           })
           .then(res => {
             res.data = res.data.filter(
@@ -285,64 +284,63 @@ export default {
           });
       });
     },
-    async nextJump(){
+    async nextJump() {
       var item = this.reportdata;
-      var studyItem = this.studyItem
+      var studyItem = this.studyItem;
       if (studyItem.sectionId) {
-            //返回节
-            this.$router.replace({
-              path: `/my-course-detail/${item.goodsId}`,
-              query: {
-                gradeId: item.gradeId,
-                orderGoodsId: item.orderGoodsId,
-                courseId: studyItem.courseId,
-                chapterId: studyItem.chapterId,
-                moduleId: studyItem.moduleId,
-                sectionId: studyItem.sectionId,
-                recordingUrl: studyItem.recordingUrl,
-                liveUrl: studyItem.liveUrl,
-                sectionType: studyItem.sectionType,
-                liveStartTime: studyItem.liveStartTime,
-                liveEndTime: studyItem.liveEndTime
-              }
-            });
-            this.studyLog(item, studyItem);
+        //返回节
+        this.$router.replace({
+          path: `/my-course-detail/${item.goodsId}`,
+          query: {
+            gradeId: item.gradeId,
+            orderGoodsId: item.orderGoodsId,
+            courseId: studyItem.courseId,
+            chapterId: studyItem.chapterId,
+            moduleId: studyItem.moduleId,
+            sectionId: studyItem.sectionId,
+            recordingUrl: studyItem.recordingUrl,
+            liveUrl: studyItem.liveUrl,
+            sectionType: studyItem.sectionType,
+            liveStartTime: studyItem.liveStartTime,
+            liveEndTime: studyItem.liveEndTime
           }
-          if (studyItem.examId) {
-            //有次数限制
-            let num = await this.bankRecordDoNum(item, studyItem);
-            let examItem = await this.$request.getExamDetail(studyItem.examId);
-            // section.doNum
-            // record.status == 0 && record.historyExamJson 继续做题
-            if (
-              (examItem.data.answerNum - num > 0 &&
-                examItem.data.answerNum > 0) ||
-              examItem.data.answerNum == 0
-            ) {
-              this.$router.replace({
-                path: "/course-exam/" + item.goodsId,
-                query: {
-                  courseId: studyItem.courseId,
-                  gradeId: item.gradeId,
-                  moduleId: studyItem.moduleId || 0,
-                  sectionId: studyItem.sectionId || 0,
-                  examId: studyItem.examId,
-                  learning: studyItem.studyStatus,
-                  type: studyItem.examType, //题卷类型 1章卷 2节卷 3模块卷,
-                  chapterId: studyItem.chapterId || 0,
-                  orderGoodsId: item.orderGoodsId,
-                  nextStatus: "next" //是否继续播放课程
-                }
-              });
-            } else {
-              this.$message({
-                type: "warning",
-                message: "该试卷只能答题" + examItem.data.answerNum + "次"
-              });
-              return;
+        });
+        this.studyLog(item, studyItem);
+      }
+      if (studyItem.examId) {
+        //有次数限制
+        let num = await this.bankRecordDoNum(item, studyItem);
+        let examItem = await this.$request.getExamDetail(studyItem.examId);
+        // section.doNum
+        // record.status == 0 && record.historyExamJson 继续做题
+        if (
+          (examItem.data.answerNum - num > 0 && examItem.data.answerNum > 0) ||
+          examItem.data.answerNum == 0
+        ) {
+          this.$router.replace({
+            path: "/course-exam/" + item.goodsId,
+            query: {
+              courseId: studyItem.courseId,
+              gradeId: item.gradeId,
+              moduleId: studyItem.moduleId || 0,
+              sectionId: studyItem.sectionId || 0,
+              examId: studyItem.examId,
+              learning: studyItem.studyStatus,
+              type: studyItem.examType, //题卷类型 1章卷 2节卷 3模块卷,
+              chapterId: studyItem.chapterId || 0,
+              orderGoodsId: item.orderGoodsId,
+              nextStatus: "next" //是否继续播放课程
             }
-          }
-      this.nextDialogStatus = false
+          });
+        } else {
+          this.$message({
+            type: "warning",
+            message: "该试卷只能答题" + examItem.data.answerNum + "次"
+          });
+          return;
+        }
+      }
+      this.nextDialogStatus = false;
     },
     async GetNext() {
       var item = this.reportdata;
@@ -352,7 +350,7 @@ export default {
       let list = await this.studyRecordMenuAllList(item);
       //返回第一个没学习的节或试卷
       this.studyItem = this.checkListDontStudy(list);
-      this.nextDialogStatus = true
+      this.nextDialogStatus = true;
     },
     getcourList() {
       this.$axios({
@@ -374,7 +372,10 @@ export default {
     bankReport() {
       this.$request.bankReportData(this.recordId).then(res => {
         this.reportdata = res.data;
-        if (this.$route.query.nextStatus == "next" && this.reportdata.reportStatus) {
+        if (
+          this.$route.query.nextStatus == "next" &&
+          this.reportdata.reportStatus
+        ) {
           this.GetNext();
         }
         console.log("reportdata:", this.reportdata);

+ 1 - 0
src/pages/live-detail/index.vue

@@ -5384,6 +5384,7 @@ export default {
             courseId: this.courseId,
             gradeId: this.gradeId,
             goodsId: this.goodsId,
+            orderGoodsId: this.orderGoodsId,
           })
           .then((res) => {
             resolve(res.data);

+ 2 - 1
src/pages/person-center/my-course/index.vue

@@ -976,7 +976,8 @@ export default {
           .studyRecordMenuAllListWithExam({
             courseId: courseItem.courseId,
             gradeId: item.gradeId,
-            goodsId: item.goodsId
+            goodsId: item.goodsId,
+            orderGoodsId:item.orderGoodsId
           })
           .then(res => {
             // res.data = res.data.filter(