浏览代码

Merge branch 'x_bf_1' into dev

xiejiebiao 2 年之前
父节点
当前提交
90d80ed71b

+ 35 - 3
src/apis/bank.js

@@ -56,7 +56,12 @@ export default {
 			method: 'get',
 		})
 	},
-
+	bankTempExam(data) {
+		return request({
+			url: '/bank/exam/temp/' + data,
+			method: 'get',
+		})
+	},
 	bankRecord(data) {
 		return request({
 			url: '/bank/record',
@@ -305,6 +310,33 @@ export default {
 			params: data
 		})
 	},
-	
-
+	// 每日一练信息
+	getToDayExam(goodsId) {
+		return request({
+			url: `/bank/question/getToDayExam/${goodsId}`,
+			method: 'get'
+		})
+	},
+	// 打卡记录
+	getPunchRecord(data) {
+		return request({
+			url: '/bank/question/get/special/record',
+			method: 'get',
+			params: data
+		})
+	},
+	// 打卡
+	punchClock(data) {
+		return request({
+			url: '/bank/question/special/exam/record',
+			method: 'post',
+			data: data
+		})
+	},
+	getRandomExam(orderGoodsId) {
+		return request({
+			url: `/goods/bank/questionTempNum/${orderGoodsId}`,
+			method: 'get'
+		})
+	},
 }

+ 24 - 9
src/apis/common.js

@@ -72,11 +72,11 @@ export default {
   },
 
   /**
- * 
- * @param {*} data 
- * @returns 
- * 查询商品课程双师资绑定列表
- */
+   * 
+   * @param {*} data 
+   * @returns 
+   * 查询商品课程双师资绑定列表
+   */
   getGoodsCourseTeacher(data) {
     return request({
       url: '/app/common/course/teacher/list',
@@ -204,7 +204,13 @@ export default {
       noToken: true
     })
   },
-
+  goodsExamRandomList(data) {
+    return request({
+      url: '/bank/exam/temp',
+      method: 'post',
+      data
+    })
+  },
   /**
    * 
    * @param {*} data 
@@ -219,7 +225,16 @@ export default {
       noToken: true
     })
   },
-
+  // 随机练习解析
+  goodsQuestionTempList(data) {
+    return request({
+      url: '/app/common/bank/question/temp/list',
+      method: 'get',
+      params: data,
+      noToken: true
+    })
+  },
+  
   /**
    * 
    * @param {*} data 
@@ -317,7 +332,7 @@ export default {
 
     })
   },
-  
+
   getWeAppLink(data) {
     return request({
       url: '/app/common/get/small/link',
@@ -327,4 +342,4 @@ export default {
     })
   }
 
-}
+}

+ 45 - 62
src/apis/polvy.js

@@ -1,68 +1,51 @@
 import request from '@/axios'
 export default {
-    //获取保利威视频上传签名
-    inquirepolyvvideogetPolyvUpload(data) {
-        return request({
-            url: '/polyv/video/getPolyvUpload',
-            method: 'get',
-            params: data
-        })
-    },
-    //同步保利威视频
-    uploadPolyvvideocata(data) {
-        return request({
-            url: '/polyv/video/importList',
-            method: 'post',
-            data
-        })
-    },
-    //查询保利威视频分类
-    obtainpolyvvideosignlistCata(data) {
-        return request({
-            url: '/polyv/video/listCata',
-            method: 'get',
-            params: data
-        })
-    },
-    //获取保利威视频播放凭证
-    obtainpolyvvideosign(data) {
-        return request({
-            url: `/polyv/video/sign/` + data,
-            method: 'get',
-        })
-    },
-    //获取保利威视频信息详细信息
-    inquirepolyvvideo(data) {
-        return request({
-            url: `/polyv/video/` + data,
-            method: 'get',
-        })
-    },
-    //获取保利威视频播放凭证
-    obtainpolyvvideopcsign(data) {
-        return request({
-            url: `/polyv/video/sign/pc/` + data,
-            method: 'get',
-        })
-    },
-    //获取保利威视频信息详细信息
-    polyvLivesign(data) {
-        return request({
-            url: `/polyv/live/sign`,
-            method: 'get',
-            params: data
-        })
-    },
-
-    //获取保利威视频信息详细信息
-    studyRecordGetChannelBasicInfo(data) {
-        return request({
-            url: `/study/record/getChannelBasicInfo`,
-            method: 'get',
-            params: data
-        })
-    },
+  //获取保利威视频上传签名
+  inquirepolyvvideogetPolyvUpload(data) {
+      return request({
+          url: '/polyv/video/getPolyvUpload',
+          method: 'get',
+          params: data
+      })
+  },
+  //同步保利威视频
+  uploadPolyvvideocata(data) {
+      return request({
+          url: '/polyv/video/importList',
+          method: 'post',
+          data
+      })
+  },
+  //查询保利威视频分类
+  obtainpolyvvideosignlistCata(data) {
+      return request({
+          url: '/polyv/video/listCata',
+          method: 'get',
+          params: data
+      })
+  },
+  //获取保利威视频播放凭证
+  obtainpolyvvideosign(data) {
+      return request({
+          url: `/polyv/video/sign/` + data,
+          method: 'get',
+      })
+  },
+  //获取保利威视频播放凭证
+  obtainpolyvvideopcsign(data) {
+    return request({
+        url: `/polyv/video/sign/pc/` + data,
+        method: 'get',
+    })
+},
 
+  //获取保利威视频信息详细信息
+  inquirepolyvvideo(data) {
+    return request({
+        url: `/polyv/video/` + data,
+        method: 'get',
+    })
+  },
 
 
 

+ 1 - 1
src/apis/user.js

@@ -356,7 +356,7 @@ export default {
        params:data,
      })
    },
-   //查询用户最后一次看的录播的信息
+   //查询用户最后一次看的视频的信息
    studyrecordgetUserWatchLast(data) {
       return request({
         url: '/study/record/getUserWatchLast',

二进制
src/assets/BG_punch.png


二进制
src/assets/basket.png


二进制
src/assets/no-data.png


二进制
src/assets/testpaper.png


二进制
src/assets/tick.png


+ 7 - 1
src/components/common/CollectionBox.vue

@@ -27,13 +27,14 @@ export default {
   methods: {
     collect() {
       if (this.showT) {
-        let { questionId, goodsId, orderGoodsId, examId } = this.param;
+        let { questionId, goodsId, orderGoodsId, examId, doMode } = this.param;
         this.$request
           .collectQuestion({
             examId,
             questionId,
             goodsId,
             orderGoodsId,
+            doMode
           })
           .then((res) => {
             this.$message.success("收藏成功");
@@ -60,6 +61,7 @@ export default {
   padding: 12px 0;
   border-top: 1px solid #eeeeee;
 }
+
 .col {
   width: 100%;
   display: flex;
@@ -68,6 +70,7 @@ export default {
   border-radius: 4px;
 
   cursor: pointer;
+
   div {
     height: 30px;
     line-height: 30px;
@@ -75,16 +78,19 @@ export default {
     align-items: center;
     font-size: 13px;
   }
+
   img {
     margin-right: 4px;
   }
 }
+
 .tuck {
   width: 68px;
   border: 1px solid #3f8dfd;
   color: #3f8dfd;
   background: #f2f7ff;
 }
+
 .cancel {
   width: 86px;
   color: #ffffff;

+ 10 - 4
src/components/exam/HeaderTabBox.vue

@@ -3,8 +3,7 @@
     <div class="title">{{ examInfo.examName }}</div>
     <div class="tab_box">
       <div class="text">
-        已完成 <span>{{ num }}</span
-        >/{{ allNum || examInfo.questionNum }} 道题
+        已完成 <span>{{ num }}</span>/{{ allNum || examInfo.questionNum }} 道题
       </div>
       <div class="header_btns">
         <div class="btn" @click="$emit('prevQuestion')">上一题</div>
@@ -32,9 +31,9 @@ export default {
     };
   },
   mounted() {
-    if (this.$route.query.examId || this.examId) {
+    if (this.examId || this.$route.query.examId * 1) {
       this.$request
-        .bankExam(this.$route.query.examId || this.examId)
+        .bankExam(this.examId || this.$route.query.examId)
         .then((res) => {
           this.examInfo = res.data;
         });
@@ -51,21 +50,25 @@ export default {
   display: flex;
   align-items: center;
   justify-content: space-between;
+
   .title {
     font-weight: 500;
     color: #222222;
     font-size: 16px;
   }
+
   .tab_box {
     display: flex;
     align-items: center;
   }
+
   .header_btns {
     display: flex;
     justify-content: space-around;
     align-items: center;
     border: 1px solid #3f8dfd;
     border-radius: 4px;
+
     .btn {
       cursor: pointer;
       width: 66px;
@@ -75,6 +78,7 @@ export default {
       text-align: center;
       color: #3f8dfd;
       border-radius: 4px;
+
       &:nth-of-type(2) {
         background: #3f8dfd;
         color: #ffffff;
@@ -82,9 +86,11 @@ export default {
       }
     }
   }
+
   .text {
     margin-right: 20px;
     font-size: 14px;
+
     span {
       font-family: Microsoft YaHei;
       font-weight: bold;

+ 1 - 1
src/components/rebuildModal/index.vue

@@ -32,7 +32,7 @@
                   <div class="title">
                     <span class="note" v-if="item.type == 0"> 测试 </span>
                     <span class="note note--yellow" v-if="item.type == 1"
-                      >录播</span
+                      >视频</span
                     >
                     <span class="note note--yellow" v-if="item.type == 2"
                       >直播</span

+ 0 - 1
src/main.js

@@ -17,7 +17,6 @@ import vueEsign from 'vue-esign'
 import axios from './axios.js'
 import 'moment/locale/zh-cn'
 
-console.dir(Vue,'Vue')
 Vue.config.productionTip = false
 Vue.prototype.$store = store
 Vue.prototype.$request = request

+ 3 - 0
src/pages/bank-exam-continue/index.vue

@@ -1287,6 +1287,7 @@ export default {
           questionId: this.questionList[current].questionId,
           goodsId: this.goodsId,
           orderGoodsId: this.orderGoodsId,
+          doMode: 1
         })
         .then((res) => {
           this.$set(this.collectList, current, res.data);
@@ -1581,6 +1582,7 @@ export default {
             questionId: this.questionList[index].questionId,
             goodsId: this.goodsId || "",
             orderGoodsId: this.orderGoodsId,
+            doMode:1
           })
           .then((res) => {
             this.$set(this.collectList, index, true);
@@ -1838,6 +1840,7 @@ export default {
           questionIds: doWrongQuestionIds,
           recordId: this.recordId,
           type: 1,
+          doMode: this.doMode
         })
         .then((res) => {})
         .catch((err) => {});

+ 84 - 1
src/pages/bank-exam-explain/index.vue

@@ -19,6 +19,7 @@
               <div class="left-box">
                 <Header-tab-box
                   :num="questionOverNum(true)"
+                  :allNum="questionList.length"
                   @prevQuestion="prevQuestion"
                   @nextQuestion="nextQuestion"
                 ></Header-tab-box>
@@ -804,7 +805,10 @@ export default {
     this.moduleId = this.$route.query.moduleId;
     this.chapterId = this.$route.query.chapterId;
     this.goodsId = this.$route.query.goodsId;
-    this.goodsQuestionList();
+    this.examType = this.$route.query.examType;
+    this.$route.query.examType == 2
+      ? this.goodsQuestionTempList()
+      : this.goodsQuestionList();
   },
   methods: {
     ...mapMutations(["setExamResult"]),
@@ -908,7 +912,86 @@ export default {
           this.questionList = res.data;
         });
     },
+    // 随机练习试卷
+    goodsQuestionTempList() {
+      this.$request
+        .goodsQuestionTempList({
+          examId: this.examId,
+        })
+        .then(async (res) => {
+          res.data.forEach((item, index) => {
+            // if (typeof item.jsonStr == "string") {
+            item.jsonStr = JSON.parse(item.jsonStr);
+
+            if (item.type == 2) {
+              //多选
+              item.jsonStr.forEach((str) => {
+                str.optionsId = "" + str.optionsId;
+              });
+              let arr = item.answerQuestion.split(",");
+              arr.forEach((a, i) => {
+                arr[i] = "" + a;
+              });
+              item.ans = arr;
+              item.ques = item.ans;
+              return;
+            } else if (item.type == 5) {
+              item.ansText = {
+                text: item.analysisContent,
+                imageList: [],
+              };
+
+              item.ques = {
+                text: item.analysisContent,
+                imageList: [],
+              };
+              return;
+            } else if (item.type == 4) {
+              console.log(item.jsonStr);
+              item.ques = [];
+              item.current = 0;
+              let ansArr = [];
+              item.jsonStr.forEach((json, index) => {
+                if (json.type == 1) {
+                  ansArr[index] = json.answerQuestion;
+                } else if (json.type == 2) {
+                  json.optionsList.forEach((str) => {
+                    str.optionsId = "" + str.optionsId;
+                  });
+                  let arr = json.answerQuestion.split(",");
+                  arr.forEach((a, i) => {
+                    arr[i] = "" + a;
+                  });
+                  ansArr[index] = arr;
+                } else if (json.type == 3) {
+                  ansArr[index] = json.answerQuestion;
+                } else if (json.type == 5) {
+                  ansArr[index] = {
+                    text: "",
+                    imageList: [],
+                  };
+                  json.ansText = {
+                    text: "",
+                    imageList: [],
+                  };
+                }
+              });
+
+              item.ans = ansArr;
+              item.ques = item.ans;
+              return;
+            }
 
+            item.ans = item.answerQuestion;
+            item.ques = item.ans;
+            // } else {
+            //   item.ques = item.ans;
+            // }
+          });
+
+          this.questionList = res.data;
+        });
+    },
     nextQuestion() {
       if (this.current >= this.questionList.length - 1) {
         this.$message({

+ 222 - 47
src/pages/bank-exam/index.vue

@@ -19,9 +19,11 @@
               <div class="left-box">
                 <Header-tab-box
                   :num="questionOverNum(true)"
+                  :allNum="questionList.length"
                   @prevQuestion="prevQuestion"
                   @nextQuestion="nextQuestion"
-                ></Header-tab-box>
+                >
+                </Header-tab-box>
                 <div class="left-box__body">
                   <template v-for="(question, questionIndex) in questionList">
                     <div
@@ -782,7 +784,8 @@
                                     rows="5"
                                     v-model="json.ansText.text"
                                     resize="none"
-                                  ></el-input>
+                                  >
+                                  </el-input>
                                   <div class="upload clearfix">
                                     <div
                                       class="upload__imgs"
@@ -987,7 +990,8 @@
                   :param="param"
                   @sumit="getCollectInfo(current)"
                   :showT="!collectList[current]"
-                ></Collection-box>
+                >
+                </Collection-box>
               </div>
               <div class="right-box">
                 <div class="right-box__header">
@@ -998,8 +1002,8 @@
                     size="small"
                     class="back-btn"
                     @click="$router.back(-1)"
-                    >返回</el-button
-                  >
+                    >返回
+                  </el-button>
                 </div>
 
                 <div class="right-box__footer">
@@ -1143,24 +1147,28 @@ export default {
       current: 0,
       bankType: 0,
       timer: null,
-      examData: {},
       orderGoodsId: "",
       collectList: [],
       isSubmit: false,
       postTimer: null,
-      examName: "",
+      number: "",
     };
   },
   async mounted() {
     this.orderGoodsId = this.$route.query.orderGoodsId || "";
     this.current = +this.$route.query.current || 0;
     this.goodsId = this.$route.params.goodsId;
+    this.number = this.$route.query.number;
     this.examId = this.$route.query.examId;
     this.moduleId = this.$route.query.moduleId;
     this.chapterId = this.$route.query.chapterId;
-
     await this.bankExam();
-    this.goodsQuestionList();
+    if (!this.number) {
+      this.goodsQuestionList();
+    } else {
+      // 随机练习
+      this.goodsExamRandomList();
+    }
   },
 
   beforeDestroy() {
@@ -1291,6 +1299,7 @@ export default {
           questionId: this.questionList[current].questionId,
           goodsId: this.goodsId,
           orderGoodsId: this.orderGoodsId,
+          doMode: this.doMode,
         })
         .then((res) => {
           this.$set(this.collectList, current, res.data);
@@ -1370,8 +1379,6 @@ export default {
 
           res.data.forEach((item, index) => {
             item.jsonStr = JSON.parse(item.jsonStr);
-
-            console.log(item.type, "item");
             if (item.type == 2) {
               //多选
               item.jsonStr.forEach((str) => {
@@ -1495,7 +1502,150 @@ export default {
           await this.examRecord();
         });
     },
+    // 随机练习题目
+    goodsExamRandomList() {
+      this.$request
+        .goodsExamRandomList({
+          goodsId: this.goodsId,
+          number: this.number,
+          orderGoodsId: this.orderGoodsId,
+        })
+        .then(async (res) => {
+          if (!res.data.questionList.length) {
+            this.$message({
+              type: "warning",
+              message: "该试卷暂无题目",
+            });
+            return;
+          }
+          this.examId = res.data.examId;
+          this.bankType = 1;
+          res.data.questionList.forEach((item, index) => {
+            item.jsonStr = JSON.parse(item.jsonStr);
+
+            console.log(item.type, "item");
+            if (item.type == 2) {
+              //多选
+              item.jsonStr.forEach((str) => {
+                str.optionsId = "" + str.optionsId;
+              });
+              let arr = item.answerQuestion.split(",");
+              arr.forEach((a, i) => {
+                arr[i] = "" + a;
+              });
+              item.ans = arr;
+              item.quesSelect = [];
+              item.analysisContent &&
+                (item.analysisContent = item.analysisContent.replace(
+                  /<img/gi,
+                  '<img style="max-width:100%;"'
+                ));
+              item.content &&
+                (item.content = item.content.replace(
+                  /<img/gi,
+                  '<img style="max-width:100%;"'
+                ));
+              return;
+            } else if (item.type == 5) {
+              //简答题
+              item.ansText = {
+                text: "",
+                imageList: [],
+              };
+              item.ques = {
+                text: "",
+                imageList: [],
+              };
+              item.analysisContent &&
+                (item.analysisContent = item.analysisContent.replace(
+                  /<img/gi,
+                  '<img style="max-width:100%;"'
+                ));
+              item.content &&
+                (item.content = item.content.replace(
+                  /<img/gi,
+                  '<img style="max-width:100%;"'
+                ));
+
+              return;
+            } else if (item.type == 4) {
+              //案例题
+              console.log(item.jsonStr);
+              item.ques = [];
+              item.tabIndex = "0";
+              let ansArr = [];
+              item.jsonStr.forEach((json, index) => {
+                if (json.type == 1) {
+                  ansArr[index] = json.answerQuestion;
+                  json.content &&
+                    (json.content = json.content.replace(
+                      /<img/gi,
+                      '<img style="max-width:100%;"'
+                    ));
+                } else if (json.type == 2) {
+                  json.optionsList.forEach((str) => {
+                    str.optionsId = "" + str.optionsId;
+                  });
+                  let arr = json.answerQuestion.split(",");
+                  arr.forEach((a, i) => {
+                    arr[i] = "" + a;
+                  });
+                  ansArr[index] = arr;
+                  json.content &&
+                    (json.content = json.content.replace(
+                      /<img/gi,
+                      '<img style="max-width:100%;"'
+                    ));
+                } else if (json.type == 3) {
+                  ansArr[index] = json.answerQuestion;
+                  json.content &&
+                    (json.content = json.content.replace(
+                      /<img/gi,
+                      '<img style="max-width:100%;"'
+                    ));
+                } else if (json.type == 5) {
+                  ansArr[index] = {
+                    text: "",
+                    imageList: [],
+                  };
+                  json.ansText = {
+                    text: "",
+                    imageList: [],
+                  };
+                  json.ques = {
+                    text: "",
+                    imageList: [],
+                  };
+                  json.content &&
+                    (json.content = json.content.replace(
+                      /<img/gi,
+                      '<img style="max-width:100%;"'
+                    ));
+                }
+              });
 
+              item.ans = ansArr;
+              return;
+            }
+            item.analysisContent &&
+              (item.analysisContent = item.analysisContent.replace(
+                /<img/gi,
+                '<img style="max-width:100%;"'
+              ));
+            item.content &&
+              (item.content = item.content.replace(
+                /<img/gi,
+                '<img style="max-width:100%;"'
+              ));
+            item.ques = "";
+            item.ans = item.answerQuestion;
+          });
+          this.questionList = res.data.questionList;
+          this.lastCount = this.questionList.length;
+          this.getCollectInfo(this.current);
+          await this.examRecord();
+        });
+    },
     /**
      * 记录总题数,获取recordId
      * hasSpecial (是否包含简答和案例) true 包含  false 不包含
@@ -1523,6 +1673,7 @@ export default {
             orderGoodsId: this.orderGoodsId,
             totalQuestionNum: questionList,
             allQuestionNum: this.questionList.length,
+            doMode: this.doMode,
           })
           .then((res) => {
             this.recordId = res.data;
@@ -1657,7 +1808,9 @@ export default {
           doQuestionNum: doQuestionNum,
           historyExamJson: JSON.stringify(this.questionList),
         })
-        .then((res) => {});
+        .then((res) => {
+          this.punchClock();
+        });
     },
 
     /**
@@ -1665,10 +1818,13 @@ export default {
      */
     bankExam() {
       return new Promise((resolve) => {
+        if (this.examType) {
+          this.bankType = 1;
+          resolve();
+          return;
+        }
         this.$request.bankExam(this.examId).then((res) => {
           this.bankType = res.data.doType;
-          this.examName = res.data.examName;
-          this.examData = res.data;
           if (this.bankType == 2) {
             this.needBack = true;
           }
@@ -1804,6 +1960,7 @@ export default {
      * 判断点击确认
      */
     judgeSelect(question, questionIndex, index) {
+      console.log(this.bankType);
       // if (question.ques) return;
       if (question.ques && this.bankType == 1) {
         return;
@@ -2171,7 +2328,7 @@ export default {
 
             if (isOver) {
               count++;
-              console.log(item, 444);
+              console.log(item, 4441);
             }
           }
         } else if (item.type == 5) {
@@ -2187,31 +2344,6 @@ export default {
 
       return count;
     },
-
-    collect(state, index) {
-      if (!state) {
-        this.$request
-          .collectQuestion({
-            examId: this.examId,
-            questionId: this.questionList[index].questionId,
-            goodsId: this.goodsId || "",
-            orderGoodsId: this.orderGoodsId,
-          })
-          .then((res) => {
-            this.$set(this.collectList, index, true);
-            this.$message.success("收藏成功");
-            this.getCollectInfo(index);
-          });
-      } else {
-        this.$request
-          .deleteCollectQuestion(this.collectList[index].collectQuestionId)
-          .then((res) => {
-            this.$set(this.collectList, index, false);
-            this.$message.success("取消收藏成功");
-          });
-      }
-      return;
-    },
     submit() {
       let ansCount = this.questionOverNum(true); //已答题数
       this.lastCount = this.questionList.length - ansCount; //统计未答完的题数
@@ -2279,7 +2411,6 @@ export default {
      * 交卷,跳转报告页
      */
     examSubmit() {
-      console.log(12313);
       this.loading = true;
       clearInterval(this.timer);
       clearInterval(this.postTimer);
@@ -2466,7 +2597,7 @@ export default {
             type: "success",
             message: "交卷成功",
           });
-
+          this.punchClock();
           setTimeout(() => {
             this.$router.replace({
               path: "/bank-report/" + this.goodsId,
@@ -2476,6 +2607,7 @@ export default {
                 moduleId: this.moduleId,
                 examId: this.examId,
                 recordId: this.recordId,
+                examType: this.examType,
               },
             });
           }, 1000);
@@ -2493,11 +2625,24 @@ export default {
           questionIds: doWrongQuestionIds,
           recordId: this.recordId,
           type: 1,
+          doMode: this.doMode,
         })
         .then((res) => {})
         .catch((err) => {});
     },
-
+    // 打卡
+    punchClock() {
+      if (this.examType != 1) {
+        return;
+      }
+      this.$request.punchClock({
+        chapterExamId: this.chapterId,
+        examId: this.examId,
+        goodsId: this.goodsId,
+        moduleExamId: this.moduleId,
+        recordTime: new Date(new Date().setHours(0, 0, 0, 0)) / 1000,
+      });
+    },
     /**
      * 交卷,不用跳转
      */
@@ -2668,7 +2813,9 @@ export default {
           doTime: parseInt(this.allTimes) - parseInt(this.lastTime),
           historyExamJson: JSON.stringify(this.questionList),
         })
-        .then((res) => {});
+        .then((res) => {
+          this.punchClock();
+        });
 
       console.log(222);
       //错题集id提交(客观题)
@@ -2680,6 +2827,7 @@ export default {
           questionIds: doWrongQuestionIds,
           recordId: this.recordId,
           type: 1,
+          doMode: this.doMode,
         })
         .then((res) => {
           this.loading = false;
@@ -2701,8 +2849,15 @@ export default {
         collectQuestionId: this.collectList[this.current]
           ? this.collectList[this.current].collectQuestionId
           : undefined,
+        doMode: this.doMode,
       };
     },
+    doMode() {
+      return this.number ? 2 : 1;
+    },
+    examType() {
+      return this.$route.query.examType || (this.number ? 2 : 0);
+    },
   },
 };
 </script>
@@ -2712,6 +2867,7 @@ export default {
 .course-exam {
   .section {
     overflow: hidden;
+
     &__header {
       height: 20px;
       margin-top: 20px;
@@ -2719,12 +2875,10 @@ export default {
 
     &__body {
       .explain-record {
-        &__header {
-        }
-
         &__body {
           margin-bottom: 20px;
           border: 1px solid #eee;
+
           .left-box {
             position: relative;
             float: left;
@@ -2738,6 +2892,7 @@ export default {
                 display: flex;
                 flex-direction: column;
                 height: 100%;
+
                 &__title {
                   padding-left: 12px;
                   font-size: 16px;
@@ -2756,6 +2911,7 @@ export default {
                   color: #666666;
                   line-height: 24px;
                   text-align: justify;
+
                   /deep/ img {
                     max-width: 100% !important;
                   }
@@ -2775,6 +2931,7 @@ export default {
                   .question-list {
                     padding: 24px 0 24px 24px;
                     border-bottom: 1px solid #eee;
+
                     .checkbox,
                     .radio {
                       cursor: pointer;
@@ -2793,13 +2950,16 @@ export default {
                       &.right {
                         background: #37c65b;
                       }
+
                       &.wrong {
                         background: #ff3a30;
                       }
+
                       &.user_choose {
                         background: #007aff;
                       }
                     }
+
                     &.textarea {
                       margin-right: 12px;
 
@@ -2824,6 +2984,7 @@ export default {
                             max-height: 100%;
                           }
                         }
+
                         &__btn {
                           margin-right: 10px;
                           width: 80px;
@@ -2863,14 +3024,17 @@ export default {
                         }
                       }
                     }
+
                     /deep/
                       .el-checkbox__input.is-checked
                       + .el-checkbox__label {
                       color: #000 !important;
                     }
+
                     .el-checkbox__input.is-disabled + span.el-checkbox__label {
                       color: #000;
                     }
+
                     /deep/ .el-checkbox {
                       white-space: normal;
                     }
@@ -2946,6 +3110,7 @@ export default {
                       }
                     }
                   }
+
                   .question {
                     padding-bottom: 58px;
                   }
@@ -2954,6 +3119,7 @@ export default {
                 &__btns {
                   position: relative;
                   height: 32px;
+
                   .submit {
                     cursor: pointer;
                     margin: 0 auto;
@@ -3058,6 +3224,7 @@ export default {
                       &.green {
                         background: #37c65b;
                       }
+
                       &.red {
                         background: #ff3a30;
                       }
@@ -3065,6 +3232,7 @@ export default {
                       &.yellow {
                         background: #ffc53d;
                       }
+
                       &.blue,
                       &.check_ans {
                         background: #3f8dfd;
@@ -3080,18 +3248,21 @@ export default {
                   &::-webkit-scrollbar {
                     width: 6px;
                   }
+
                   &::-webkit-scrollbar-track {
                     background-color: #fff;
                     -webkit-border-radius: 2em;
                     -moz-border-radius: 2em;
                     border-radius: 2em;
                   }
+
                   &::-webkit-scrollbar-thumb {
                     background-color: #eeeeee;
                     -webkit-border-radius: 2em;
                     -moz-border-radius: 2em;
                     border-radius: 2em;
                   }
+
                   .list {
                     display: flex;
                     flex-wrap: wrap;
@@ -3128,6 +3299,7 @@ export default {
                         color: #fff;
                         background: #3f8dfd;
                       }
+
                       &.yellow {
                         background: #ffc53d;
                       }
@@ -3174,6 +3346,7 @@ export default {
     /deep/ .el-dialog__header {
       display: none;
     }
+
     /deep/ .el-dialog__body {
       padding: 0;
       overflow: unset;
@@ -3207,6 +3380,7 @@ export default {
     &__body {
       height: 400px;
       padding: 40px 24px;
+
       .left-box {
         width: 336px;
         float: left;
@@ -3245,6 +3419,7 @@ export default {
       height: 90px;
       border-top: 1px solid #eee;
       text-align: center;
+
       .take {
         display: inline-block;
         width: 200px;

+ 98 - 71
src/pages/bank-report/index.vue

@@ -139,19 +139,27 @@
         </div>
 
         <div class="section__footer">
-          <el-button type="primary" @click="back" class="btn"
-            >返回列表</el-button
-          >
-          <el-button
-            type="primary"
-            class="btn"
-            v-if="nextExamId"
-            @click="backBank"
-            >练习下一节</el-button
-          >
-          <el-button type="primary" class="btn" @click="doRepeat(reportdata)"
-            >重新做题</el-button
-          >
+          <template v-if="!examType">
+            <el-button type="primary" @click="back" class="btn"
+              >返回列表</el-button
+            >
+            <el-button
+              type="primary"
+              class="btn"
+              v-if="nextExamId"
+              @click="backBank"
+              >练习下一节</el-button
+            >
+            <el-button type="primary" class="btn" @click="doRepeat(reportdata)"
+              >重新做题</el-button
+            >
+          </template>
+          <template v-else>
+            <el-button type="primary" @click="back" class="btn">返回</el-button>
+            <el-button type="primary" @click="back" class="btn"
+              >继续练习</el-button
+            >
+          </template>
           <el-button
             type="primary"
             class="btn"
@@ -230,9 +238,10 @@ export default {
       recordId: 0,
       orderGoodsId: "",
       courseList: [],
-			pageNum: 1,
-			pageSize: 10,
-			total: 0,
+      pageNum: 1,
+      pageSize: 10,
+      total: 0,
+      examType: 0,
     };
   },
   computed: {
@@ -245,34 +254,40 @@ export default {
     this.recordId = this.$route.query.recordId;
     this.orderGoodsId = this.$route.query.orderGoodsId || "";
     this.goodsId = this.$route.params.goodsId;
-
-    this.getcourList()
+    this.examType = this.$route.query.examType;
+    this.getcourList();
     this.examWrongRecordWrongNum();
     this.bankExamNextExam();
-    await this.bankExam();
+    if (this.examType == 2) {
+      // 随机
+      await this.bankTempExam();
+    } else {
+      await this.bankExam();
+    }
+
     await this.examReport();
   },
   methods: {
     getcourList() {
-        this.$axios({
-            url: '/apply/recommend/goodsList',
-            method: 'post',
-            data: {
-                examId: this.examId,
-                pageNum: this.pageNum,
-                pageSize: this.pageSize,
-                platform: 2,
-            }
-        }).then((res) => {
-            if (res.code == 200) {
-              this.courseList = res.rows || []
-              this.total = res.total
-            }
-        })
+      this.$axios({
+        url: "/apply/recommend/goodsList",
+        method: "post",
+        data: {
+          examId: this.examId,
+          pageNum: this.pageNum,
+          pageSize: this.pageSize,
+          platform: 2,
+        },
+      }).then((res) => {
+        if (res.code == 200) {
+          this.courseList = res.rows || [];
+          this.total = res.total;
+        }
+      });
     },
     currentChangeCou(val) {
-      this.pageNum = val
-      this.getcourList()
+      this.pageNum = val;
+      this.getcourList();
     },
     back() {
       // this.$router.replace({
@@ -282,7 +297,10 @@ export default {
       //   },
       // });
       this.$router.replace({
-        path: "/person-center/my-bank/index"
+        path: "/person-center/my-bank/index",
+        query: {
+          examType: this.examType * 1 || undefined,
+        },
       });
     },
     /**
@@ -400,7 +418,15 @@ export default {
         });
       });
     },
-
+    bankTempExam() {
+      return new Promise((resolve) => {
+        this.$request.bankTempExam(this.examId).then((res) => {
+          res.data.doType = 1;
+          this.examData = res.data;
+          resolve();
+        });
+      });
+    },
     examReport() {
       return new Promise((resolve) => {
         this.$request.examReport(this.recordId).then((res) => {
@@ -444,10 +470,12 @@ export default {
   .re_back {
     text-align: right;
     margin: 10px 0px;
+
     .back-btn {
       width: 100px;
     }
   }
+
   .section {
     &__header {
       height: 120px;
@@ -456,6 +484,7 @@ export default {
 
       &--warm {
         background: #fff3f5;
+
         .title {
           text-align: center;
           font-size: 18px;
@@ -479,6 +508,7 @@ export default {
 
       &--success {
         background: #f8fef9;
+
         .title {
           text-align: center;
           font-size: 18px;
@@ -634,6 +664,7 @@ export default {
               border: 0;
               height: 100%;
               display: flex;
+
               .child {
                 flex: 1;
                 height: 100%;
@@ -707,47 +738,43 @@ export default {
   }
 
   .course_list {
-      .course {
-        background: #f5f7fa;
-        padding-top: 40px;
+    .course {
+      background: #f5f7fa;
+      padding-top: 40px;
 
-        &__header {
-          display: flex;
-          align-items: center;
-          justify-content: space-between;
-
-          .title {
-            background: url("~@/assets/video.png") no-repeat left center;
-            padding-left: 36px;
-            font-size: 24px;
-            font-family: YouSheBiaoTiHei;
-            font-weight: 400;
-            color: #333333;
-            text-shadow: 0px 6px 6px rgba(249, 113, 13, 0.08);
-          }
+      &__header {
+        display: flex;
+        align-items: center;
+        justify-content: space-between;
 
-          
+        .title {
+          background: url("~@/assets/video.png") no-repeat left center;
+          padding-left: 36px;
+          font-size: 24px;
+          font-family: YouSheBiaoTiHei;
+          font-weight: 400;
+          color: #333333;
+          text-shadow: 0px 6px 6px rgba(249, 113, 13, 0.08);
         }
+      }
 
-        
-
-        &__body {
-          .list {
-            width: 100%;
+      &__body {
+        .list {
+          width: 100%;
 
-            .course-item {
-              float: left;
-            }
+          .course-item {
+            float: left;
           }
         }
-
-      }
-      .pagination {
-        display: flex;
-        align-items: center;
-        justify-content: center;
-        margin: 20px 0px;
       }
     }
+
+    .pagination {
+      display: flex;
+      align-items: center;
+      justify-content: center;
+      margin: 20px 0px;
+    }
+  }
 }
 </style>

+ 123 - 29
src/pages/course-detail/index.vue

@@ -159,7 +159,7 @@
                                                     section.sectionType == 1
                                                   "
                                                 >
-                                                  录播
+                                                  视频
                                                 </div>
                                                 <div
                                                   class="note"
@@ -230,7 +230,7 @@
                                                     class="btn btn--green"
                                                     v-if="section.learning == 1"
                                                   >
-                                                    已
+                                                    已
                                                   </div>
                                                 </template>
                                               </template>
@@ -442,7 +442,7 @@
                                                     section.sectionType == 1
                                                   "
                                                 >
-                                                  录播
+                                                  视频
                                                 </div>
                                                 <div
                                                   class="note"
@@ -511,7 +511,7 @@
                                                     class="btn btn--green"
                                                     v-if="section.learning == 1"
                                                   >
-                                                    已
+                                                    已
                                                   </div>
                                                 </template>
                                               </template>
@@ -655,7 +655,7 @@
                                             class="note note--blue"
                                             v-if="menu.sectionType == 1"
                                           >
-                                            录播
+                                            视频
                                           </div>
                                           <div
                                             class="note"
@@ -715,7 +715,7 @@
                                               class="btn btn--green"
                                               v-if="menu.learning == 1"
                                             >
-                                              已
+                                              已
                                             </div>
                                           </template>
                                         </template>
@@ -846,7 +846,7 @@
                                                     section.sectionType == 1
                                                   "
                                                 >
-                                                  录播
+                                                  视频
                                                 </div>
                                                 <div
                                                   class="note"
@@ -917,7 +917,7 @@
                                                     class="btn btn--green"
                                                     v-if="section.learning == 1"
                                                   >
-                                                    已
+                                                    已
                                                   </div>
                                                 </template>
                                               </template>
@@ -1061,7 +1061,7 @@
                                                     section.sectionType == 1
                                                   "
                                                 >
-                                                  录播
+                                                  视频
                                                 </div>
                                                 <div
                                                   class="note"
@@ -1130,7 +1130,7 @@
                                                     class="btn btn--green"
                                                     v-if="section.learning == 1"
                                                   >
-                                                    已
+                                                    已
                                                   </div>
                                                 </template>
                                               </template>
@@ -1247,7 +1247,7 @@
                                             class="note note--blue"
                                             v-if="menu.sectionType == 1"
                                           >
-                                            录播
+                                            视频
                                           </div>
                                           <div
                                             class="note"
@@ -1307,7 +1307,7 @@
                                               class="btn btn--green"
                                               v-if="menu.learning == 1"
                                             >
-                                              已
+                                              已
                                             </div>
                                           </template>
                                         </template>
@@ -1765,7 +1765,8 @@
                               rows="3"
                               type="textarea"
                               placeholder=""
-                            ></el-input>
+                            >
+                            </el-input>
                           </div>
                           <el-button
                             type="primary"
@@ -3338,7 +3339,7 @@ export default {
       }
       if (index) {
         let prevItem = this.courseList[index - 1];
-        if (prevItem.stuAllNum != prevItem.secAllNum ) {
+        if (prevItem.stuAllNum != prevItem.secAllNum) {
           return this.$message({
             type: "warning",
             message: "需按课程顺序学习",
@@ -3398,7 +3399,7 @@ export default {
             console.log(res, "couse");
             if (res.data) {
               if (res.data.sectionType == 1) {
-                //录播
+                //视频
                 this.chapterId = res.data.chapterId;
                 this.moduleId = res.data.moduleId;
                 this.playSectionId = res.data.sectionId;
@@ -4966,7 +4967,9 @@ export default {
 
     photographSuccess(stream) {
       // 兼容webkit核心浏览器
-
+      if (this.isVirtualCamera(stream)) {
+        return;
+      }
       this.isTaking = true;
       this.takePhotoModal = true;
 
@@ -4997,6 +5000,33 @@ export default {
         this.$router.go(-1);
       });
     },
+    isVirtualCamera(stream) {
+      const list = [
+        "VCam",
+        "ManyCam",
+        "OBS",
+        "ClassInCam",
+        "Ev",
+        "Video2Webcam",
+      ];
+      let isT = list.some((e) => {
+        return stream.getTracks()[0].label.indexOf(e) != -1;
+      });
+      if (isT) {
+        this.$confirm("检测到你使用虚拟摄像头,无法继续学习。", "提示", {
+          confirmButtonText: "返回",
+          showConfirmButton: true,
+          closeOnClickModal: false,
+          showCancelButton: false,
+          closeOnPressEscape: false,
+          distinguishCancelAndClose: false,
+          showClose: false,
+        }).then(() => {
+          this.$router.go(-1);
+        });
+      }
+      return isT;
+    },
     /**
      * 切换科目
      */
@@ -5545,7 +5575,7 @@ export default {
     },
     async initVideo(option) {
       if (option.sectionType == 1 || option.sectionType == 3) {
-        //录播
+        //视频
 
         let learnNum = await this.goodsTodayStudySectionNum(option);
         let hasLearn = await this.gradeCheckGoodsStudy(option);
@@ -5691,11 +5721,6 @@ export default {
         }
       }
       if (option.sectionType == 1) {
-        console.log("lubo点击点击点击点击");
-        //录播
-
-        //设置播放的节ID
-
         //提交保存观看历史
         if (this.playSectionId) {
           this.postStudyRecord(0, this.playSectionId);
@@ -5709,12 +5734,10 @@ export default {
         //播放视频
         this.showRecordStatus = false; //隐藏播放记录提示
         this.sectionItem = option;
-        console.log(option, "option=======>sectionItem");
         this.isPlayRebuild = option.rebuild;
         this.moduleId = option.moduleId || 0;
         this.chapterId = option.chapterId || 0;
         this.playSectionId = option.sectionId || option.menuId;
-        // console.log(this.moduleId, this.chapterId, this.playSectionId);
         await this.getPhotoLastRecord();
         this.recordObj = await this.getRecordLast();
         this.getNoteList();
@@ -5857,7 +5880,7 @@ export default {
     loadPlayer() {
       var self = this;
       const polyvPlayer = window.polyvPlayer;
-      console.log(polyvPlayer);
+      console.log(polyvPlayer, this.recordObj.videoCurrentTime, 666);
       self.$request.obtainpolyvvideosign(self.vid).then((res) => {
         console.log(res, "res2");
         self.player = polyvPlayer({
@@ -6275,9 +6298,10 @@ export default {
       if (this.vidzb) {
         currentTime = 2; //直播无法获取,无论开始结束都传2秒
       }
+      if (currentTime == 0) {
+        return;
+      }
       let self = this;
-      console.log(this);
-      console.log(PlayDuration, "PlayDuration");
       let data = {
         fromPlat: 2, //来源平台 1小程序 2网站
         photo: self.ossAvatarUrl,
@@ -6703,6 +6727,7 @@ export default {
           moduleId: parseInt(self.moduleId),
         };
         self.$request.recordLast(data).then((res) => {
+          console.log(res.data, "res.datares.datares.datares.datares.data");
           resolve(res.data);
         });
       });
@@ -6791,8 +6816,8 @@ export default {
           ) {
             this.needOpenNew = false;
             if (this.sectionItem.sectionType == 1) {
-              console.log("录播", this.sectionItem);
-              //录播
+              console.log("视频", this.sectionItem);
+              //视频
               this.chapterId = this.sectionItem.chapterId;
               this.moduleId = this.sectionItem.moduleId;
               this.playSectionId = this.sectionItem.sectionId;
@@ -7351,6 +7376,7 @@ export default {
 .course-detail {
   .section {
     padding-bottom: 30px;
+
     &__header {
       height: 40px;
       display: flex;
@@ -7386,6 +7412,7 @@ export default {
               border: 0;
             }
           }
+
           .left-box {
             width: 810px;
             height: 455px;
@@ -7394,11 +7421,13 @@ export default {
             background-position: center center;
             background-repeat: no-repeat;
             position: relative;
+
             .video {
               width: 100%;
               height: 100%;
             }
           }
+
           .recordStyle {
             position: absolute;
             bottom: 90px;
@@ -7408,6 +7437,7 @@ export default {
             color: #fff;
             border-radius: 24px;
             user-select: none;
+
             .btn_sty {
               cursor: pointer;
             }
@@ -7578,6 +7608,7 @@ export default {
                             color: #007aff;
                           }
                         }
+
                         .exercises {
                           cursor: pointer;
                           font-size: 14px;
@@ -7619,16 +7650,19 @@ export default {
             &__body {
               height: 374px;
               overflow-y: scroll;
+
               &::-webkit-scrollbar {
                 // width: 6px;
                 display: none;
               }
+
               &::-webkit-scrollbar-track {
                 background-color: #060e1a;
                 -webkit-border-radius: 2em;
                 -moz-border-radius: 2em;
                 border-radius: 2em;
               }
+
               &::-webkit-scrollbar-thumb {
                 background-color: #eeeeee;
                 -webkit-border-radius: 2em;
@@ -7652,6 +7686,7 @@ export default {
 
           .course-menu {
             margin-top: 25px;
+
             .left-box {
               width: 948px;
               float: left;
@@ -7659,6 +7694,7 @@ export default {
               &__header {
                 padding-right: 50px;
                 position: relative;
+
                 .item {
                   width: auto;
                   margin-right: 24px;
@@ -7682,6 +7718,7 @@ export default {
                 .buy-note {
                   margin-right: 50px;
                 }
+
                 .item {
                   margin-top: 24px;
                   padding: 16px;
@@ -7718,6 +7755,7 @@ export default {
             .right-box {
               width: 255px;
               float: right;
+
               .title {
                 font-size: 16px;
                 font-family: Microsoft YaHei;
@@ -7746,6 +7784,7 @@ export default {
           .answer-question {
             &__header {
               border-bottom: 1px solid #eee;
+
               .textarea-wrap {
                 background: #f9f9f9;
                 border: 1px solid #eeeeee;
@@ -7936,6 +7975,7 @@ export default {
 
                 .textarea {
                   border-bottom: 1px solid #eee;
+
                   .submit {
                     float: right;
                     width: 138px;
@@ -7950,6 +7990,7 @@ export default {
                 .note-list {
                   &__content {
                     border-bottom: 1px solid #eee;
+
                     &__title {
                       width: 216px;
                       height: 24px;
@@ -7962,9 +8003,11 @@ export default {
                       margin: 20px 0;
                     }
                   }
+
                   &__item {
                     display: flex;
                     padding: 15px;
+
                     .el-icon-video-play {
                       cursor: pointer;
                       font-size: 20px;
@@ -8016,6 +8059,7 @@ export default {
                 .lecture-list {
                   background: #f5f7fa;
                   border-radius: 8px;
+
                   &__header {
                     padding: 0 16px;
                     height: 40px;
@@ -8044,6 +8088,7 @@ export default {
                         line-height: 55px;
                         display: flex;
                         align-items: center;
+
                         .title {
                           flex: 1;
                           font-size: 16px;
@@ -8074,10 +8119,12 @@ export default {
 
                   &__footer {
                     margin-top: 24px;
+
                     .lecture-scan {
                       background: #f5f7fa;
                       border-radius: 8px;
                       overflow: hidden;
+
                       &__header {
                         height: 40px;
                         line-height: 40px;
@@ -8112,6 +8159,7 @@ export default {
     /deep/ .el-dialog__header {
       display: none;
     }
+
     /deep/ .el-dialog__body {
       padding: 0;
       overflow: unset;
@@ -8145,6 +8193,7 @@ export default {
     &__body {
       // height: 400px;
       padding: 40px 24px;
+
       .left-box {
         width: 336px;
         float: left;
@@ -8173,10 +8222,12 @@ export default {
         height: 400px;
         position: relative;
         overflow: hidden;
+
         video {
           width: 100%;
           height: 100%;
         }
+
         .mask {
           width: 55%;
           height: 200px;
@@ -8195,6 +8246,7 @@ export default {
       height: 90px;
       border-top: 1px solid #eee;
       text-align: center;
+
       .take {
         display: inline-block;
         width: 200px;
@@ -8245,16 +8297,20 @@ export default {
     }
   }
 }
+
 .answer-question {
   max-height: 416px;
   overflow-y: auto;
   padding: 16px;
   background: rgb(63, 68, 73);
+
   &::-webkit-scrollbar {
     display: none;
   }
+
   &__header {
     border-bottom: 1px solid #555;
+
     .textarea-wrap {
       // background: #65696D;
       border: 1px solid #555;
@@ -8262,6 +8318,7 @@ export default {
 
       .textarea {
         height: 100%;
+
         &::placeholder {
           color: red;
         }
@@ -8361,6 +8418,7 @@ export default {
               padding: 20px 0;
               display: flex;
               border-bottom: 1px solid #555555;
+
               &:nth-last-of-type(1) {
                 border: 0;
               }
@@ -8441,14 +8499,17 @@ export default {
     }
   }
 }
+
 .lecture-notes {
   &::-webkit-scrollbar {
     display: none;
   }
+
   max-height: 416px;
   overflow-y: auto;
   padding: 16px;
   background: rgb(63, 68, 73);
+
   &__content {
     .left-boxs {
       // float: left;
@@ -8456,6 +8517,7 @@ export default {
 
       .textarea {
         border-bottom: 1px solid #555555;
+
         .submit {
           padding: 10px 20px;
           border-radius: 2px;
@@ -8469,6 +8531,7 @@ export default {
       .note-list {
         &__content {
           border-bottom: 1px solid #555555;
+
           &__title {
             width: 216px;
             height: 24px;
@@ -8481,9 +8544,11 @@ export default {
             margin: 20px 0;
           }
         }
+
         &__item {
           display: flex;
           padding: 15px;
+
           .el-icon-video-play {
             cursor: pointer;
             font-size: 20px;
@@ -8535,6 +8600,7 @@ export default {
       .lecture-list {
         background: #f5f7fa;
         border-radius: 8px;
+
         &__header {
           padding: 0 16px;
           height: 40px;
@@ -8563,6 +8629,7 @@ export default {
               line-height: 55px;
               display: flex;
               align-items: center;
+
               .title {
                 flex: 1;
                 font-size: 16px;
@@ -8593,10 +8660,12 @@ export default {
 
         &__footer {
           margin-top: 24px;
+
           .lecture-scan {
             background: #f5f7fa;
             border-radius: 8px;
             overflow: hidden;
+
             &__header {
               height: 40px;
               line-height: 40px;
@@ -8622,51 +8691,62 @@ export default {
     }
   }
 }
+
 .user_notes {
   border-bottom: 1px solid #555;
+
   .p1 {
     margin: 8px 0px;
     color: #3f8dfd;
     font-size: 14px;
+
     span {
       float: right;
       color: #999;
       font-size: 12px;
     }
   }
+
   .p2 {
     margin-bottom: 8px;
     font-size: 14px;
     color: #ccc;
   }
 }
+
 /deep/ textarea {
   background: #65696d;
   color: #c7c7c7;
   border-color: transparent;
 }
+
 /deep/ .el-input__count {
   color: #999;
   background: transparent;
 }
+
 .lecture-notesjy {
   display: flex;
   flex-direction: column;
   max-height: 416px;
+
   .listItem {
     padding-bottom: 14px;
     margin-bottom: 10px;
     border-bottom: 1px solid #eee;
+
     .titles {
       color: #fff;
       font-weight: bold;
       text-align: center;
       padding: 10px;
     }
+
     .btns {
       display: flex;
       justify-content: space-around;
       align-items: center;
+
       .btn {
         border-radius: 8px;
         background-color: #fff;
@@ -8674,6 +8754,7 @@ export default {
         user-select: none;
         cursor: pointer;
         transition: all 0.2s;
+
         &:hover {
           background-color: #f2f7ff;
           color: #3f8dfd;
@@ -8681,14 +8762,17 @@ export default {
       }
     }
   }
+
   .lecture-listFooter {
     flex: 1;
     overflow: auto;
   }
 }
+
 .topstyle {
   border-bottom: 2px solid #eee;
   margin-bottom: 16px;
+
   p {
     background-color: #f8f8f9;
     font-size: 14px;
@@ -8696,10 +8780,12 @@ export default {
     padding: 5px 12px;
   }
 }
+
 .height_style {
   max-height: 600px;
   overflow-y: auto;
 }
+
 .list_style {
   height: 62px;
   color: #222;
@@ -8708,20 +8794,24 @@ export default {
   cursor: pointer;
   transition: all 0.2s;
   display: flex;
+
   &:hover {
     background-color: rgba(63, 141, 253, 0.3) !important;
   }
 }
+
 .list_styleHeader {
   height: 60px;
   color: #3f8dfd;
   line-height: 58px;
   padding: 0px 16px;
 }
+
 // 老师名字样式
 .teacher_names {
   display: flex;
   margin-left: 20px;
+
   .names {
     font-size: 13px;
     color: #666666;
@@ -8730,16 +8820,19 @@ export default {
     // background: #F8F8F8;
     border-radius: 4px;
     padding: 3px 6px;
+
     &.nactive {
       color: #3f8dfd;
       background: #f2f7ff;
     }
   }
 }
+
 .teacherList_name {
   display: flex;
   margin-left: 20px;
   margin-top: 10px;
+
   .names {
     font-size: 13px;
     color: #383838;
@@ -8748,6 +8841,7 @@ export default {
     background: #818181;
     border-radius: 4px;
     padding: 3px 6px;
+
     &.nactive {
       background: #cccccc;
     }

+ 30 - 2
src/pages/course-exam/index.vue

@@ -1269,6 +1269,7 @@ export default {
           questionId: this.questionList[current].questionId,
           goodsId: this.goodsId,
           orderGoodsId: this.orderGoodsId,
+          doMode: 1
         })
         .then((res) => {
           this.$set(this.collectList, current, res.data);
@@ -1653,7 +1654,9 @@ export default {
 
     photographSuccess(stream) {
       // 兼容webkit核心浏览器
-
+      if (this.isVirtualCamera(stream)) {
+        return
+      }
       this.isTaking = true;
       this.takePhotoModal = true;
 
@@ -1684,7 +1687,30 @@ export default {
         this.$router.go(-1);
       });
     },
-
+    isVirtualCamera(stream) {
+      const list = ['VCam', 'ManyCam', 'OBS', 'ClassInCam', 'Ev', 'Video2Webcam']
+      let isT = list.some(e => {
+        return stream.getTracks()[0].label.indexOf(e) != -1
+      })
+      if (isT) {
+        this.$confirm(
+          "检测到你使用虚拟摄像头,无法继续学习。",
+          "提示",
+          {
+            confirmButtonText: "返回",
+            showConfirmButton: true,
+            closeOnClickModal: false,
+            showCancelButton: false,
+            closeOnPressEscape: false,
+            distinguishCancelAndClose: false,
+            showClose: false,
+          }
+        ).then(() => {
+          this.$router.go(-1);
+        });
+      }
+      return isT
+    },
     /**
      * 记录总题数,获取recordId
      * hasSpecial (是否包含简答和案例) true 包含  false 不包含
@@ -2208,6 +2234,7 @@ export default {
             questionId: this.questionList[index].questionId,
             goodsId: this.goodsId || "",
             orderGoodsId: this.orderGoodsId,
+            doMode:1
           })
           .then((res) => {
             this.$set(this.collectList, index, true);
@@ -2513,6 +2540,7 @@ export default {
           questionIds: doWrongQuestionIds,
           recordId: this.recordId,
           type: 2, // 视频课程的传2
+          doMode: this.doMode
         })
         .then((res) => {})
         .catch((err) => {});

+ 42 - 16
src/pages/live-detail/index.vue

@@ -150,7 +150,7 @@
                                                     section.sectionType == 1
                                                   "
                                                 >
-                                                  录播
+                                                  视频
                                                 </div>
                                                 <div
                                                   class="note"
@@ -264,7 +264,7 @@
                                                     class="btn btn--green"
                                                     v-if="section.learning == 1"
                                                   >
-                                                    已
+                                                    已
                                                   </div>
                                                 </template>
                                               </template> -->
@@ -412,7 +412,7 @@
                                                     section.sectionType == 1
                                                   "
                                                 >
-                                                  录播
+                                                  视频
                                                 </div>
                                                 <div
                                                   class="note"
@@ -522,7 +522,7 @@
                                                     class="btn btn--green"
                                                     v-if="section.learning == 1"
                                                   >
-                                                    已
+                                                    已
                                                   </div>
                                                 </template>
                                               </template> -->
@@ -643,7 +643,7 @@
                                             class="note note--blue"
                                             v-if="menu.sectionType == 1"
                                           >
-                                            录播
+                                            视频
                                           </div>
                                           <div
                                             class="note"
@@ -739,7 +739,7 @@
                                               class="btn btn--green"
                                               v-if="menu.learning == 1"
                                             >
-                                              已
+                                              已
                                             </div>
                                           </template> -->
                                         </template>
@@ -852,7 +852,7 @@
                                                     section.sectionType == 1
                                                   "
                                                 >
-                                                  录播
+                                                  视频
                                                 </div>
                                                 <div
                                                   class="note"
@@ -923,7 +923,7 @@
                                                     class="btn btn--green"
                                                     v-if="section.learning == 1"
                                                   >
-                                                    已
+                                                    已
                                                   </div>
                                                 </template>
                                               </template> -->
@@ -1067,7 +1067,7 @@
                                                     section.sectionType == 1
                                                   "
                                                 >
-                                                  录播
+                                                  视频
                                                 </div>
                                                 <div
                                                   class="note"
@@ -1136,7 +1136,7 @@
                                                     class="btn btn--green"
                                                     v-if="section.learning == 1"
                                                   >
-                                                    已
+                                                    已
                                                   </div>
                                                 </template>
                                               </template> -->
@@ -1253,7 +1253,7 @@
                                             class="note note--blue"
                                             v-if="menu.sectionType == 1"
                                           >
-                                            录播
+                                            视频
                                           </div>
                                           <div
                                             class="note"
@@ -1313,7 +1313,7 @@
                                               class="btn btn--green"
                                               v-if="menu.learning == 1"
                                             >
-                                              已
+                                              已
                                             </div>
                                           </template> -->
                                         </template>
@@ -2947,7 +2947,7 @@ export default {
           console.log(res, "couse");
           if (res.data) {
             if (res.data.sectionType == 1) {
-              //录播
+              //视频
               this.chapterId = res.data.chapterId;
               this.moduleId = res.data.moduleId;
               this.playSectionId = res.data.sectionId;
@@ -4451,7 +4451,9 @@ export default {
 
     photographSuccess(stream) {
       // 兼容webkit核心浏览器
-
+      if (this.isVirtualCamera(stream)) {
+        return
+      }
       this.isTaking = true;
       this.takePhotoModal = true;
 
@@ -4482,6 +4484,30 @@ export default {
         this.$router.go(-1);
       });
     },
+    isVirtualCamera(stream) {
+      const list = ['VCam', 'ManyCam', 'OBS', 'ClassInCam', 'Ev', 'Video2Webcam']
+      let isT = list.some(e => {
+        return stream.getTracks()[0].label.indexOf(e) != -1
+      })
+      if (isT) {
+        this.$confirm(
+          "检测到你使用虚拟摄像头,无法继续学习。",
+          "提示",
+          {
+            confirmButtonText: "返回",
+            showConfirmButton: true,
+            closeOnClickModal: false,
+            showCancelButton: false,
+            closeOnPressEscape: false,
+            distinguishCancelAndClose: false,
+            showClose: false,
+          }
+        ).then(() => {
+          this.$router.go(-1);
+        });
+      }
+      return isT
+    },
     /**
      * 切换科目
      */
@@ -5068,7 +5094,7 @@ export default {
     async initVideo(option) {
       console.log("initVideo", option);
       if (option.sectionType == 1 || option.sectionType == 3) {
-        //录播
+        //视频
 
         // let learnNum = await this.goodsTodayStudySectionNum(option);
         // let hasLearn = await this.gradeCheckGoodsStudy(option);
@@ -5228,7 +5254,7 @@ export default {
         }
       }
       if (option.sectionType == 1) {
-        //录播
+        //视频
         //设置播放的节ID
 
         //提交保存观看历史

+ 2 - 2
src/pages/living-room/index.vue

@@ -229,7 +229,7 @@ export default {
       goodsStatus: 0, // 0未上架,1上架
       showAuth: false, 
       shareShow: false,
-      sectionType: 2, //sectionType: 2, // 节类型 1录播 2直播 3回放	
+      sectionType: 2, //sectionType: 2, // 节类型 1视频 2直播 3回放	
       vid: '', // 回放的id
       formShare: {
         links: '',
@@ -319,7 +319,7 @@ export default {
           moduleId: this.moduleId || null,
           chapterId: this.chapterId || null,
           sectionId: this.sectionId, // 节id
-          sectionType: this.sectionType, //节类型 1录播 2直播 3回放
+          sectionType: this.sectionType, //节类型 1视频 2直播 3回放
         },
       }).then((res) => {
         this.shareLoading = false

+ 3 - 0
src/pages/mock-exam/index.vue

@@ -1287,6 +1287,7 @@ export default {
           questionId: this.questionList[current].questionId,
           goodsId: this.goodsId,
           orderGoodsId: this.orderGoodsId,
+          doMode: 1
         })
         .then((res) => {
           this.$set(this.collectList, current, res.data);
@@ -2128,6 +2129,7 @@ export default {
             questionId: this.questionList[index].questionId,
             goodsId: this.goodsId || "",
             orderGoodsId: this.orderGoodsId,
+            doMode:1
           })
           .then((res) => {
             this.$set(this.collectList, index, true);
@@ -2609,6 +2611,7 @@ export default {
           examId: this.examId,
           questionIds: doWrongQuestionIds,
           recordId: this.recordId,
+          doMode: this.doMode
         })
         .then((res) => {
           this.loading = false;

+ 64 - 56
src/pages/person-center/bank-record/index.vue

@@ -76,7 +76,9 @@
                       <div
                         class="btn-line__in"
                         @click="doRepeat(record)"
-                        v-if="record.status == 1"
+                        v-if="
+                          record.status == 1 && record.paperName != '随机练习'
+                        "
                       >
                         <div>重新做题</div>
                       </div>
@@ -85,9 +87,17 @@
                         @click="
                           go('/bank-exam-explain/' + record.goodsId, {
                             examId: record.examId,
-                            chapterId: record.courseType == 2 ? record.chapterId : record.chapterExamId,
-                            moduleId: record.courseType == 2 ? record.moduleId: record.moduleExamId,
+                            chapterId:
+                              record.courseType == 2
+                                ? record.chapterId
+                                : record.chapterExamId,
+                            moduleId:
+                              record.courseType == 2
+                                ? record.moduleId
+                                : record.moduleExamId,
                             orderGoodsId: record.orderGoodsId,
+                            examType:
+                              record.paperName == '随机练习' ? 2 : undefined,
                           })
                         "
                         v-if="record.status == 1"
@@ -101,10 +111,7 @@
                       >
                         <div>做题报告</div>
                       </div>
-                      <div
-                        class="btn-line__in"
-                        @click="moreRecords(record)"
-                      >
+                      <div class="btn-line__in" @click="moreRecords(record)">
                         <div>更多记录</div>
                       </div>
                     </div>
@@ -186,7 +193,7 @@ export default {
       });
     },
     moreRecords(record) {
-      let queryData = {}
+      let queryData = {};
       if (record.courseType == 2) {
         queryData = {
           examId: record.examId,
@@ -196,12 +203,11 @@ export default {
           courseId: record.courseId,
           sectionId: record.sectionId,
           courseType: record.courseType,
-        }
+        };
         this.$router.push({
-          path: '/person-center/record-list/' + record.goodsId, 
-          query: queryData
-        })
-
+          path: "/person-center/record-list/" + record.goodsId,
+          query: queryData,
+        });
       } else {
         queryData = {
           examId: record.examId,
@@ -209,11 +215,11 @@ export default {
           moduleId: record.moduleExamId,
           recordId: record.recordId,
           courseType: record.courseType,
-        }
+        };
         this.$router.push({
-          path: '/person-center/record-list/' + record.goodsId, 
-          query: queryData
-        })
+          path: "/person-center/record-list/" + record.goodsId,
+          query: queryData,
+        });
       }
     },
     currentChange(e) {
@@ -228,14 +234,14 @@ export default {
     },
 
     async doRepeat(section) {
-      console.log('section:', section)
-      let count = 0
+      console.log("section:", section);
+      let count = 0;
       if (section.courseType == 2) {
-        count = await this.bankRecordDoNum(section)
+        count = await this.bankRecordDoNum(section);
       } else {
-        count = await this.examRecordCount(section.examId)
+        count = await this.examRecordCount(section.examId);
       }
-      console.log('已做的次数', count)
+      console.log("已做的次数", count);
       let answerNum = await this.getExamDetail(section.examId);
       //超过答题次数
       if (answerNum > 0 && count >= answerNum) {
@@ -255,32 +261,31 @@ export default {
         showClose: false,
       })
         .then((_) => {
-          if (section.courseType == 2){
-              this.$router.push({
-                path: "/course-exam/" + section.goodsId,
-                query: {
-                  courseId: section.courseId,
-                  gradeId: section.gradeId || 0,
-                  moduleId: section.moduleId || 0,
-                  sectionId: section.sectionId || 0,
-                  examId: section.examId,
-                  type: section.type, // 模块卷类型
-                  chapterId: section.chapterId || 0,
-                  orderGoodsId: section.orderGoodsId,
-                },
-            })
+          if (section.courseType == 2) {
+            this.$router.push({
+              path: "/course-exam/" + section.goodsId,
+              query: {
+                courseId: section.courseId,
+                gradeId: section.gradeId || 0,
+                moduleId: section.moduleId || 0,
+                sectionId: section.sectionId || 0,
+                examId: section.examId,
+                type: section.type, // 模块卷类型
+                chapterId: section.chapterId || 0,
+                orderGoodsId: section.orderGoodsId,
+              },
+            });
           } else {
             this.$router.push({
-            path: "/bank-exam/" + section.goodsId,
-            query: {
-              orderGoodsId: section.orderGoodsId,
-              examId: section.examId,
-              moduleId: section.moduleExamId || 0,
-              chapterId: section.chapterExamId || 0,
-            },
-          });
+              path: "/bank-exam/" + section.goodsId,
+              query: {
+                orderGoodsId: section.orderGoodsId,
+                examId: section.examId,
+                moduleId: section.moduleExamId || 0,
+                chapterId: section.chapterExamId || 0,
+              },
+            });
           }
-          
         })
         .catch((_) => {
           this.$router.push({
@@ -342,7 +347,6 @@ export default {
       });
     },
     doReport(record) {
-      console.log('做题报告', record, record.courseType)
       if (record.courseType == 2) {
         this.$router.push({
           path: "/course-report",
@@ -351,18 +355,19 @@ export default {
             recordId: record.recordId,
             type: record.type, //type:1章卷,2节卷,3模块卷
           },
-        })
+        });
       } else {
         this.$router.push({
-            path: '/bank-report/' + record.goodsId,
-            query: {
-              chapterId: record.chapterExamId,
-              moduleId: record.moduleExamId,
-              examId: record.examId,
-              recordId: record.recordId,
-              orderGoodsId: record.orderGoodsId,
-            },
-          })
+          path: "/bank-report/" + record.goodsId,
+          query: {
+            chapterId: record.chapterExamId,
+            moduleId: record.moduleExamId,
+            examId: record.examId,
+            recordId: record.recordId,
+            orderGoodsId: record.orderGoodsId,
+            examType: record.paperName == "随机练习" ? 2 : undefined,
+          },
+        });
       }
       // go('/bank-report/' + record.goodsId, {
       //   chapterId: record.chapterExamId,
@@ -388,8 +393,10 @@ export default {
     .content {
       margin: 10px 0;
     }
+
     border-bottom: 1px solid #eee;
   }
+
   &__body {
     .bank-item {
       margin-top: 24px;
@@ -397,6 +404,7 @@ export default {
       &__header {
         height: 32px;
         line-height: 32px;
+
         .note {
           display: inline-block;
           margin-right: 15px;

+ 86 - 74
src/pages/person-center/bank-record/record-list/index.vue

@@ -35,7 +35,11 @@
                           orderGoodsId: record.orderGoodsId,
                         })
                       "
-                      v-if="courseType !=  2 && record.status == 0 && record.historyExamJson"
+                      v-if="
+                        courseType != 2 &&
+                        record.status == 0 &&
+                        record.historyExamJson
+                      "
                       >继续答题</el-button
                     >
 
@@ -43,7 +47,7 @@
                       <div
                         class="btn-line__in"
                         @click="doRepeat(record)"
-                        v-if="record.status == 1"
+                        v-if="record.status == 1 && record.paperName != '随机练习'"
                       >
                         <div>重新做题</div>
                       </div>
@@ -52,9 +56,17 @@
                         @click="
                           go('/bank-exam-explain/' + record.goodsId, {
                             examId: record.examId,
-                            chapterId: courseType == 2 ? record.chapterId : record.chapterExamId,
-                            moduleId: courseType == 2 ? record.moduleId : record.moduleExamId,
+                            chapterId:
+                              courseType == 2
+                                ? record.chapterId
+                                : record.chapterExamId,
+                            moduleId:
+                              courseType == 2
+                                ? record.moduleId
+                                : record.moduleExamId,
                             orderGoodsId: record.orderGoodsId,
+                            examType:
+                              record.paperName == '随机练习' ? 2 : undefined,
                           })
                         "
                         v-if="record.status == 1"
@@ -64,8 +76,7 @@
                       <div
                         class="btn-line__in"
                         v-if="record.status == 1"
-                        @click="doReport(record)
-                        "
+                        @click="doReport(record)"
                       >
                         <div>做题报告</div>
                       </div>
@@ -109,12 +120,12 @@ export default {
         goodsId: 0,
       },
       record: {
-        examId: '',
-        gradeId: '',
-        chapterId: '',
-        moduleId: '',
-        courseId: '',
-        sectionId: '',
+        examId: "",
+        gradeId: "",
+        chapterId: "",
+        moduleId: "",
+        courseId: "",
+        sectionId: "",
       },
       recordList: [],
       total: 0,
@@ -126,9 +137,10 @@ export default {
     this.param.chapterExamId = this.$route.query.chapterId;
     this.param.examId = this.$route.query.examId;
     this.param.goodsId = this.$route.params.goodsId;
-    this.courseType = this.$route.query.courseType
+    this.courseType = this.$route.query.courseType;
     if (this.courseType == 2) {
-      const { examId, gradeId, chapterId, moduleId, courseId, sectionId} = this.$route.query
+      const { examId, gradeId, chapterId, moduleId, courseId, sectionId } =
+        this.$route.query;
       this.record = {
         examId: +examId,
         gradeId: +gradeId,
@@ -136,12 +148,11 @@ export default {
         moduleId: +moduleId,
         courseId: +courseId,
         sectionId: +sectionId,
-      }
-      this.recordBankList()
+      };
+      this.recordBankList();
     } else {
       this.examRecordList();
     }
-    
   },
   methods: {
     go(path, query) {
@@ -156,7 +167,7 @@ export default {
       this.param.pageNum = e;
       // this.getExamRecordList();
       if (this.courseType == 2) {
-        this.recordBankList()
+        this.recordBankList();
       } else {
         this.examRecordList();
       }
@@ -169,35 +180,35 @@ export default {
     },
     recordBankList() {
       let params = {
-          examId: this.record.examId,
-          goodsId: this.param.goodsId,
-          pageNum: this.param.pageNum,
-          pageSize: this.param.pageSize
-        }
-        this.record.gradeId && (params['gradeId'] = this.record.gradeId)
-        this.record.chapterId && (params['chapterId'] = this.record.chapterId)
-        this.record.courseId && (params['courseId'] = this.record.courseId)
-        this.record.moduleId && (params['moduleId'] = this.record.moduleId)
-        this.record.sectionId && (params['sectionId'] = this.record.sectionId)
-        console.log('参数params', params)
-        this.$axios({
-          url: '/bank/record/bankList',
-          method: 'get',
-          params: params
-        }).then((res) => {
-          this.recordList = res.rows || []
-          this.total = res.total
-        })
+        examId: this.record.examId,
+        goodsId: this.param.goodsId,
+        pageNum: this.param.pageNum,
+        pageSize: this.param.pageSize,
+      };
+      this.record.gradeId && (params["gradeId"] = this.record.gradeId);
+      this.record.chapterId && (params["chapterId"] = this.record.chapterId);
+      this.record.courseId && (params["courseId"] = this.record.courseId);
+      this.record.moduleId && (params["moduleId"] = this.record.moduleId);
+      this.record.sectionId && (params["sectionId"] = this.record.sectionId);
+      console.log("参数params", params);
+      this.$axios({
+        url: "/bank/record/bankList",
+        method: "get",
+        params: params,
+      }).then((res) => {
+        this.recordList = res.rows || [];
+        this.total = res.total;
+      });
     },
     async doRepeat(section) {
       // let count = await this.examRecordCount(section.examId);
-      let count = 0
+      let count = 0;
       if (this.courseType == 2) {
-        count = await this.bankRecordDoNum(section)
+        count = await this.bankRecordDoNum(section);
       } else {
-        count = await this.examRecordCount(section.examId)
+        count = await this.examRecordCount(section.examId);
       }
-      console.log('已做的次数', count)
+      console.log("已做的次数", count);
       let answerNum = await this.getExamDetail(section.examId);
       //超过答题次数
       if (answerNum > 0 && count >= answerNum) {
@@ -217,30 +228,30 @@ export default {
         showClose: false,
       })
         .then((_) => {
-          if (this.courseType == 2){
-              this.$router.push({
-                path: "/course-exam/" + section.goodsId,
-                query: {
-                  courseId: section.courseId,
-                  gradeId: section.gradeId || 0,
-                  moduleId: section.moduleId || 0,
-                  sectionId: section.sectionId || 0,
-                  examId: section.examId,
-                  type: section.type, // 模块卷类型
-                  chapterId: section.chapterId || 0,
-                  orderGoodsId: section.orderGoodsId,
-                },
-            })
+          if (this.courseType == 2) {
+            this.$router.push({
+              path: "/course-exam/" + section.goodsId,
+              query: {
+                courseId: section.courseId,
+                gradeId: section.gradeId || 0,
+                moduleId: section.moduleId || 0,
+                sectionId: section.sectionId || 0,
+                examId: section.examId,
+                type: section.type, // 模块卷类型
+                chapterId: section.chapterId || 0,
+                orderGoodsId: section.orderGoodsId,
+              },
+            });
           } else {
-          this.$router.push({
-            path: "/bank-exam/" + section.goodsId,
-            query: {
-              orderGoodsId: section.orderGoodsId,
-              examId: section.examId,
-              moduleId: section.moduleExamId || 0,
-              chapterId: section.chapterExamId || 0,
-            },
-          });
+            this.$router.push({
+              path: "/bank-exam/" + section.goodsId,
+              query: {
+                orderGoodsId: section.orderGoodsId,
+                examId: section.examId,
+                moduleId: section.moduleExamId || 0,
+                chapterId: section.chapterExamId || 0,
+              },
+            });
           }
         })
         .catch((_) => {
@@ -311,18 +322,19 @@ export default {
             recordId: record.recordId,
             type: record.type, //type:1章卷,2节卷,3模块卷
           },
-        })
+        });
       } else {
         this.$router.push({
-            path: '/bank-report/' + record.goodsId,
-            query: {
-              chapterId: record.chapterExamId,
-              moduleId: record.moduleExamId,
-              examId: record.examId,
-              recordId: record.recordId,
-              orderGoodsId: record.orderGoodsId,
-            },
-          })
+          path: "/bank-report/" + record.goodsId,
+          query: {
+            chapterId: record.chapterExamId,
+            moduleId: record.moduleExamId,
+            examId: record.examId,
+            recordId: record.recordId,
+            orderGoodsId: record.orderGoodsId,
+            examType: record.paperName == "随机练习" ? 2 : undefined,
+          },
+        });
       }
       // go('/bank-report/' + record.goodsId, {
       //   chapterId: record.chapterExamId,

+ 3 - 1
src/pages/person-center/my-bank/bank-detail/index.vue

@@ -1304,7 +1304,7 @@ export default {
                   font-weight: bold;
                   color: #333333;
                 }
-
+                
                 .content {
                   border-top: 1px solid #eee;
                   .left {
@@ -1341,6 +1341,8 @@ export default {
             }
           }
         }
+
+        
       }
 
       .right-box {

+ 462 - 18
src/pages/person-center/my-bank/bank-detailCopy/index.vue

@@ -3,14 +3,128 @@
     <section class="section">
       <div class="section__body">
         <div class="left-box">
-          <el-tabs v-model="activeName" @tab-click="goodsBank">
+          <el-tabs v-model="activeName" @tab-click="handelTab">
             <el-tab-pane
               v-for="tab in newList"
               :key="tab.paperId"
               :label="tab.paperName"
               :name="tab.paperId + ''"
             >
-              <div class="goods-menu">
+              <div
+                v-if="tab.paperName == '每日一练'"
+                style="background: #f8f8fa; padding: 20px"
+              >
+                <template v-if="tab.examInfo">
+                  <div class="day-box">
+                    <div>
+                      <p>
+                        打卡天数<span>{{ tab.examInfo.recordCount }}</span
+                        >天
+                      </p>
+                      <p>
+                        打卡进度超过了{{ tab.examInfo.recordPercentage }}的学员
+                      </p>
+                    </div>
+                    <div @click="handelPunchClock(tab)">
+                      {{ tab.examInfo.examRecord ? "今日已打卡" : "今日打卡" }}
+                    </div>
+                    <img src="../../../../assets/basket.png" alt="" />
+                  </div>
+                  <div class="clock-in-box">
+                    <div class="clock-in-box-item">
+                      <p class="clock-title">明日打卡任务</p>
+                      <div class="clock-task">
+                        {{ tab.examInfo.examNameBelow || "暂无" }}
+                      </div>
+                    </div>
+                    <div class="clock-in-box-item">
+                      <p class="clock-title">打卡记录</p>
+                      <div class="clock-calendar">
+                        <el-calendar :first-day-of-week="7">
+                          <template slot="dateCell" slot-scope="{ date, data }">
+                            <p
+                              v-if="!isSelected(data.day)"
+                              :class="isToday(data.day) ? 'date-today' : ''"
+                            >
+                              {{ data.day.split("-").slice(2).join("-") }}
+                            </p>
+                            <p v-else class="is-Select">
+                              <img src="../../../../assets/tick.png" alt="" />
+                            </p>
+                          </template>
+                        </el-calendar>
+                      </div>
+                    </div>
+                  </div>
+                </template>
+                <div class="no-data" v-else>
+                  <div>
+                    <img src="../../../../assets/no-data.png" alt="" />
+                    <p>暂无题库,请前往购买</p>
+                  </div>
+                </div>
+              </div>
+              <div
+                v-else-if="tab.paperName == '随机练习'"
+                style="background: #f8f8fa; padding: 20px"
+              >
+                <div class="random-box">
+                  <div class="random-box-top">
+                    <p class="random-box-title">试卷情况</p>
+                    <div class="random-box-top-num">
+                      <img
+                        style="margin-right: 12px"
+                        src="../../../../assets/testpaper.png"
+                        alt=""
+                      />
+                      <div>
+                        <p>{{ tab.examInfo ? tab.examInfo.doNum : "-" }}</p>
+                        <p>已完成提数</p>
+                      </div>
+                      <div class="line"></div>
+                      <div>
+                        <p>{{ tab.examInfo ? tab.examInfo.totalNum : "-" }}</p>
+                        <p>总提数</p>
+                      </div>
+                      <div class="line"></div>
+                      <div>
+                        <p>
+                          {{
+                            tab.examInfo
+                              ? toFixed(
+                                  (tab.examInfo.rightNum /
+                                    tab.examInfo.totalNum) *
+                                    100
+                                )
+                              : "-"
+                          }}%
+                        </p>
+                        <p>正确率</p>
+                      </div>
+                    </div>
+                  </div>
+                  <div class="random-box-bom">
+                    <p class="random-box-title">做题数量</p>
+                    <div class="sle-num-box">
+                      <div
+                        :class="activeNum == val ? 'actvie' : ''"
+                        v-for="val in numList"
+                        :key="val"
+                        @click="handelNum(val)"
+                      >
+                        {{ val }}
+                      </div>
+                    </div>
+                    <div
+                      class="random-box-bom-btn"
+                      @click="beginExam(tab.examInfo)"
+                    >
+                      开始做题
+                    </div>
+                  </div>
+                </div>
+              </div>
+              <div class="goods-menu" v-else>
                 <div class="goods-menu__body">
                   <div
                     class="item"
@@ -239,8 +353,8 @@
                                   type="primary"
                                   @click="continueDo(section, item.majorId, 0)"
                                   class="btn"
-                                  >继续做题</el-button
-                                >
+                                  >继续做题
+                                </el-button>
 
                                 <el-button
                                   v-if="
@@ -255,8 +369,8 @@
                                   type="primary"
                                   @click="doRepeat(section, item.majorId, 0)"
                                   class="btn"
-                                  >重新做题</el-button
-                                >
+                                  >重新做题
+                                </el-button>
                               </div>
                             </div>
                           </div>
@@ -371,6 +485,9 @@ export default {
       wrongTotal: 0,
       needOpen: true, //是否需要打开第一章节
       recordItem: null,
+      numList: [5, 10, 15, 20, 50, 100],
+      activeNum: 5,
+      punchList: [],
     };
   },
   mounted() {},
@@ -399,17 +516,29 @@ export default {
     },
   },
   methods: {
-    async initData(data, recordItem) {
+    toFixed(num) {
+      if (num) {
+        let str = String(num).indexOf(".");
+
+        if (str != -1) {
+          return +num.toFixed(2);
+        } else {
+          return num;
+        }
+      } else {
+        return 0;
+      }
+    },
+    initData(data, recordItem) {
       this.recordItem = recordItem;
       this.orderGoodsId = data.orderGoodsId;
       this.goodsId = data.goodsId;
-      this.activeName = "0";
-      await this.getExamType(data.goodsId);
-      if (this.recordItem) {
-        this.getRecordItem();
-      } else {
-        await this.goodsBank();
-      }
+      this.getExamType(data.goodsId);
+      // if (this.recordItem) {
+      //   this.getRecordItem();
+      // } else {
+      //   await this.goodsBank();
+      // }
     },
     getRecordItem() {
       this.$request
@@ -565,10 +694,23 @@ export default {
     getExamType(id) {
       return new Promise((resolve, reject) => {
         this.$request.exampapergoodsExamPaper(id).then((res) => {
-          this.newList = [{ paperId: 0, paperName: "全部" }, ...res.data];
+          this.newList = res.data;
+          // this.newList = [{ paperId: 0, paperName: "全部" }, ...res.data];
           // if (parseInt(this.activeName) > 0) {
           //   this.tabChange({ name: this.activeName });
           // }
+          // 从结果页返回
+          let examType = this.$route.query.examType;
+          if (examType) {
+            let item = this.newList.find(
+              (e) => e.paperName == ["每日一练", "随机练习"][examType - 1]
+            );
+            this.activeName =
+              (item ? item.paperId : this.newList[0].paperId) + "";
+          } else {
+            this.activeName = this.newList[0].paperId + "";
+          }
+          this.handelTab();
           resolve();
         });
       });
@@ -580,10 +722,46 @@ export default {
         query,
       });
     },
-
+    beginExam({ rightNum, totalNum }) {
+      if (rightNum == totalNum) {
+        return this.$message.success("题目已经做完了!");
+      }
+      this.$router.push({
+        path: "/bank-exam/" + this.goodsId,
+        query: {
+          orderGoodsId: this.orderGoodsId,
+          number: this.activeNum,
+          moduleId: 0,
+          chapterId: 0,
+          examId: 0,
+        },
+      });
+    },
+    handelNum(val) {
+      this.activeNum = val;
+      // console.log(val, this.goodsId, this.orderGoodsId)
+    },
     /**
      * 获取课程目录
      */
+    handelTab() {
+      let item = this.newList.find((tab) => tab.paperId == this.activeName);
+      if (item.paperName == "每日一练") {
+        this.$request.getToDayExam(this.goodsId).then((res) => {
+          this.$set(item, "examInfo", res.data);
+        });
+        this.$request.getPunchRecord({ goodsId: this.goodsId }).then((res) => {
+          this.punchList = res.data;
+        });
+        return;
+      } else if (item.paperName == "随机练习") {
+        this.$request.getRandomExam(this.orderGoodsId).then((res) => {
+          this.$set(item, "examInfo", res.data);
+        });
+        return;
+      }
+      this.goodsBank();
+    },
     goodsBank() {
       return new Promise((resolve, reject) => {
         this.$request
@@ -723,12 +901,35 @@ export default {
       });
       this.studyLog(0, moduleId, chapterId, section.examId);
     },
-
+    handelPunchClock({ examInfo }) {
+      this.$router.push({
+        path: "/bank-exam/" + this.goodsId,
+        query: {
+          examId: examInfo.examId,
+          moduleId: examInfo.moduleExamId,
+          chapterId: examInfo.chapterExamId,
+          orderGoodsId: this.orderGoodsId,
+          examType: 1,
+        },
+      });
+    },
+    isSelected(date) {
+      if (!this.punchList.length) {
+        return false;
+      }
+      return this.punchList.some(
+        (e) => e.recordTime == new Date(date).setHours(0, 0, 0, 0) / 1000
+      );
+    },
+    isToday(date) {
+      return (
+        new Date(date).setHours(0, 0, 0, 0) == new Date().setHours(0, 0, 0, 0)
+      );
+    },
     /**
      * 继续做题
      */
     continueDo(section, chapterId, moduleId) {
-      console.log(section);
       this.$router.push({
         path: "/bank-exam-continue/" + this.goodsId,
         query: {
@@ -948,6 +1149,7 @@ export default {
   padding: 3px 4px;
   border-radius: 4px;
 }
+
 .btn_div {
   user-select: none;
   color: #666666;
@@ -956,6 +1158,7 @@ export default {
   height: 32px;
   line-height: 32px;
 }
+
 .bank-detail {
   .section {
     &__header {
@@ -969,11 +1172,244 @@ export default {
       .left-box {
         // float: left;
         // width: 768px;
+        .day-box {
+          // width: 709px;
+          height: 100px;
+          display: flex;
+          height: 110px;
+          background: url("../../../../assets/BG_punch.png");
+          background-size: 100% 100%;
+          padding-left: 36px;
+          padding-top: 16px;
+          position: relative;
+          div {
+            &:nth-of-type(1) {
+              p {
+                &:nth-of-type(1) {
+                  font-size: 16px;
+                  font-weight: 800;
+                  color: #556176;
+                  line-height: 42px;
+
+                  span {
+                    font-size: 36px;
+                    color: #222222;
+                    padding: 0 5px;
+                    // vertical-align: middle;
+                  }
+                }
+
+                &:nth-of-type(2) {
+                  font-size: 12px;
+                  color: #808da4;
+                }
+              }
+            }
+
+            &:nth-of-type(2) {
+              width: 123px;
+              height: 36px;
+              background: #3f8dfd;
+              border-radius: 30px;
+              text-align: center;
+              line-height: 36px;
+              font-size: 15px;
+              font-weight: bold;
+              color: #ffffff;
+              margin-top: 20px;
+              margin-left: 32px;
+              cursor: pointer;
+            }
+          }
+
+          img {
+            width: 92px;
+            height: 92px;
+            position: absolute;
+            right: 24px;
+          }
+        }
+
+        .no-data {
+          padding: 90px 0;
+
+          div {
+            width: 150px;
+            margin: 0 auto;
+            color: #888691;
+            text-align: center;
+
+            img {
+              display: block;
+              margin: 0 auto;
+            }
+          }
+        }
+
+        .clock-in-box {
+          display: flex;
+          justify-content: space-between;
+          margin-top: 12px;
+          padding: 20px 16px 0;
+          background: #ffffff;
+
+          .clock-in-box-item {
+            width: 49%;
+
+            .clock-title {
+              font-weight: bold;
+              color: #484848;
+              font-size: 14px;
+              margin-bottom: 20px;
+            }
+
+            .clock-calendar {
+              border: 1px solid #eee;
+
+              .date-today {
+                width: 30px;
+                height: 30px;
+                border-radius: 50%;
+                margin: 0 auto;
+                background: #409eff;
+                color: #fff;
+              }
+
+              /deep/ {
+                .el-calendar-day {
+                  height: 44px;
+                  line-height: 30px;
+                  text-align: center;
+                }
+
+                .el-calendar__body {
+                  padding: 20px;
+                }
+
+                .el-calendar__button-group {
+                  display: none;
+                }
+
+                td {
+                  border: 0;
+                }
+              }
+
+              .is-Select {
+                width: 30px;
+                height: 30px;
+                background: #e8f6ff;
+                border-radius: 50%;
+                margin: 0 auto;
+                display: flex;
+                align-items: center;
+                justify-content: center;
+              }
+            }
+
+            .clock-task {
+              background: #f8f8fa;
+              font-weight: 800;
+              color: #556176;
+              font-size: 16px;
+              padding: 25px 60px;
+              text-align: center;
+            }
+          }
+        }
+
+        .random-box {
+          .random-box-title {
+            font-weight: bold;
+            color: #222222;
+            font-size: 16px;
+          }
+
+          .random-box-top {
+            height: 146px;
+            background: #ffffff;
+            padding: 20px;
+
+            .random-box-top-num {
+              margin-top: 12px;
+              display: flex;
+              align-items: center;
+
+              div {
+                width: 128px;
+                text-align: center;
+
+                p {
+                  &:nth-of-type(1) {
+                    font-size: 24px;
+                    color: #222222;
+                    margin-bottom: 4px;
+                  }
+
+                  &:nth-of-type(2) {
+                    font-size: 12px;
+                    color: #808da4;
+                  }
+                }
+              }
+
+              .line {
+                width: 1px;
+                height: 36px;
+                background: #d9d9d9;
+              }
+            }
+          }
+
+          .random-box-bom {
+            margin-top: 20px;
+            background: #ffffff;
+            padding: 20px 20px 60px;
+
+            .sle-num-box {
+              margin: 32px 0 40px;
+              display: flex;
+              justify-content: space-around;
+
+              div {
+                width: 148px;
+                height: 48px;
+                background: #f8f8fa;
+                border-radius: 6px 6px 6px 6px;
+                text-align: center;
+                line-height: 48px;
+                font-size: 20px;
+                color: #222222;
+                cursor: pointer;
+              }
+
+              .actvie {
+                background: #e8f6ff;
+                color: #3f8dfd;
+              }
+            }
+
+            .random-box-bom-btn {
+              width: 315px;
+              height: 44px;
+              background: #3f8dfd;
+              border-radius: 8px 8px 8px 8px;
+              cursor: pointer;
+              margin: 0 auto;
+              text-align: center;
+              line-height: 44px;
+              font-size: 16px;
+              font-weight: bold;
+              color: #ffffff;
+            }
+          }
+        }
 
         /deep/.el-tabs__item {
           height: 98px;
           line-height: 98px;
         }
+
         .goods-menu {
           // padding: 0 16px 16px;
           // border-radius: 10px;
@@ -983,6 +1419,7 @@ export default {
             display: flex;
             padding-right: 8px;
             align-items: center;
+
             .title {
               padding: 10px 0;
               font-size: 16px;
@@ -1058,6 +1495,7 @@ export default {
                 .bank-section {
                   margin-left: 25px;
                   color: #99a0a7;
+
                   &__item {
                     padding-top: 20px;
                     padding-bottom: 20px;
@@ -1091,6 +1529,7 @@ export default {
             .selects {
               display: flex;
               justify-content: space-between;
+
               &__item {
                 width: 360px;
                 height: 40px;
@@ -1133,6 +1572,7 @@ export default {
 
             .list {
               overflow: hidden;
+
               &__item {
                 margin-top: 16px;
                 height: 98px;
@@ -1150,6 +1590,7 @@ export default {
 
                 .content {
                   border-top: 1px solid #eee;
+
                   .left {
                     float: left;
                     margin-left: 16px;
@@ -1170,6 +1611,7 @@ export default {
                     float: right;
                     margin-right: 16px;
                     margin-top: 10px;
+
                     .btn {
                       width: 88px;
                       height: 32px;
@@ -1188,6 +1630,7 @@ export default {
     }
   }
 }
+
 ._content {
   margin-top: 6px;
   background: #fff;
@@ -1211,6 +1654,7 @@ export default {
   .bank-section {
     margin-left: 25px;
     color: #99a0a7;
+
     &__item {
       padding-bottom: 6px;
       // border-bottom: 1px solid #eeeeee;

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

@@ -193,7 +193,7 @@
                               <span class="iconStyles">•</span>
                               <span class="upStudyStyle sizeStyle">{{
                                 is.sectionType === 1
-                                  ? "录播"
+                                  ? "视频"
                                   : is.sectionType === 2
                                   ? "直播"
                                   : is.sectionType === 3
@@ -382,7 +382,7 @@
                           <span class="iconStyles">•</span>
                           <span class="upStudyStyle sizeStyle">{{
                             i.sectionType === 1
-                              ? "录播"
+                              ? "视频"
                               : i.sectionType === 2
                               ? "直播"
                               : i.sectionType === 3
@@ -544,7 +544,7 @@
                       <span class="iconStyles">•</span>
                       <span class="upStudyStyle sizeStyle">{{
                         items.sectionType === 1
-                          ? "录播"
+                          ? "视频"
                           : items.sectionType === 2
                           ? "直播"
                           : items.sectionType === 3

+ 2 - 0
src/pages/subject/collect-bank.vue

@@ -1043,6 +1043,7 @@ export default {
           questionId,
           goodsId,
           orderGoodsId,
+          doMode: 1
         })
         .then((res) => {
           this.$set(this.collectList, this.current, res.data);
@@ -1694,6 +1695,7 @@ export default {
             questionId: questionId,
             goodsId: goodsId,
             orderGoodsId: orderGoodsId,
+            doMode:1
           })
           .then((res) => {
             this.$set(this.collectList, _i, true);