chenxiong 3 anos atrás
pai
commit
927c1e2c92
37 arquivos alterados com 865 adições e 533 exclusões
  1. 16 0
      src/apis/order.js
  2. 16 0
      src/apis/user.js
  3. 16 5
      src/axios.js
  4. 4 8
      src/components/buyCourseModal/index.vue
  5. 17 12
      src/components/goodsItem/index.vue
  6. 46 30
      src/components/rebuildModal/index.vue
  7. 1 1
      src/main.js
  8. 21 4
      src/pages/bank-exam-all-explain/index.vue
  9. 33 16
      src/pages/bank-exam-continue/index.vue
  10. 4 5
      src/pages/bank-exam-explain/index.vue
  11. 1 2
      src/pages/bank-exam-wrong-explain/index.vue
  12. 125 83
      src/pages/bank-exam/index.vue
  13. 8 3
      src/pages/bank-list/index.vue
  14. 5 1
      src/pages/bank-report/index.vue
  15. 8 0
      src/pages/cart/index.vue
  16. 126 10
      src/pages/course-detail/index.vue
  17. 15 7
      src/pages/course-exam/index.vue
  18. 3 2
      src/pages/course-list/index.vue
  19. 3 2
      src/pages/goods-detail/bank-detail.vue
  20. 2 2
      src/pages/goods-detail/course-detail.vue
  21. 3 8
      src/pages/home/index.vue
  22. 3 0
      src/pages/login/index.vue
  23. 20 13
      src/pages/payment-success/index.vue
  24. 96 18
      src/pages/payment/index.vue
  25. 5 5
      src/pages/person-center/my-bank/bank-detail/index.vue
  26. 8 7
      src/pages/person-center/my-bank/bank-explain-detail/index.vue
  27. 72 27
      src/pages/person-center/my-bank/bank-statistics/index.vue
  28. 3 3
      src/pages/person-center/my-bank/index/index.vue
  29. 12 4
      src/pages/person-center/my-classhour/index/index.vue
  30. 17 7
      src/pages/person-center/my-course/index.vue
  31. 5 2
      src/pages/person-center/my-order/index.vue
  32. 21 116
      src/pages/person-center/play-record/index.vue
  33. 1 1
      src/pages/subject/collect-bank.vue
  34. 1 1
      src/pages/subject/collect-type-bank.vue
  35. 1 1
      src/pages/subject/wrong-bank.vue
  36. 1 1
      src/pages/subject/wrong-type-bank.vue
  37. 126 126
      src/router/index.js

+ 16 - 0
src/apis/order.js

@@ -100,8 +100,24 @@ export default {
 			method: 'get',
 			params: data
 		})
+	},
+
+  orderDetail(data) {
+		return request({
+			url: '/order/detail/'+data,
+			method: 'get'
+		})
+	},
+
+  orderGoodsList(data) {
+		return request({
+			url: '/order/goods/list',
+			method: 'get',
+      params:data,
+		})
 	}
   
   
   
+  
 }

+ 16 - 0
src/apis/user.js

@@ -322,5 +322,21 @@ export default {
 			data: data,
 		})
 	},
+
+  userConfirmInfoDetail(data) {
+		return request({
+			url: '/user/confirm/info/detail',
+			method: 'GET',
+			params: data,
+		})
+	},
  
+  userConfirminfo(data) {
+    return request({
+      url: '/user/confirm/info',
+      method: 'post',
+      data: data,
+    })
+  },
+  
 }

+ 16 - 5
src/axios.js

@@ -1,13 +1,13 @@
 import axios from 'axios'
 import store from './store'
-// export const BASE_URL = 'https://api.xyyxt.net'   //release
-export const BASE_URL = 'http://42.192.164.187:19005'    //test
+export const BASE_URL = 'https://api.xyyxt.net'   //release
+// export const BASE_URL = 'http://42.192.164.187:19005'    //test
 export const tenantId = '867735392558919680'
 
 
 //图片上传api
-// export const BASE_IMG_URL = 'https://file.xyyxt.net/'     //release
-export const BASE_IMG_URL = 'https://file-dev.xyyxt.net/'  //test
+export const BASE_IMG_URL = 'https://file.xyyxt.net/'     //release
+// export const BASE_IMG_URL = 'https://file-dev.xyyxt.net/'  //test
 
 import tools from './common/tools'
 import router from './router'
@@ -60,8 +60,10 @@ request.interceptors.response.use(async (response) => {
         // });
 
         // setTimeout(() => {
-          
+          console.log('1231231')
           store.commit('setCurrentRouter',router.currentRoute)
+          localStorage.removeItem('user_account')
+          localStorage.removeItem('token')
           router.push({
             path: '/login'
           })
@@ -77,6 +79,12 @@ request.interceptors.response.use(async (response) => {
       //   message: res.msg,
       //   type: "error",
       // });
+      // localStorage.removeItem('user_account')
+      // localStorage.removeItem('token')
+      // console.log('222222')
+      // router.push({
+      //   path: '/login'
+      // })
       return Promise.reject(res)
     } else {
       return Promise.reject(res)
@@ -119,6 +127,9 @@ async function refreshToken(response) {
 
     // setTimeout(() => {
       
+      localStorage.removeItem('user_account')
+      localStorage.removeItem('token')
+      console.log('33333')
       store.commit('setCurrentRouter',router.currentRoute)
       router.push({
         path: '/login'

+ 4 - 8
src/components/buyCourseModal/index.vue

@@ -247,15 +247,11 @@ export default {
 
 <!-- Add "scoped" attribute to limit CSS to this component only -->
 <style scoped lang="scss">
-.exercises-modal {
+.select-class {
   &__content {
-    > div {
-      font-size: 16px;
-      line-height: 30px;
-      text-align: center;
-
-      img {
-        display: inline;
+    .selection {
+      .el-select {
+        width: 100%;
       }
     }
   }

+ 17 - 12
src/components/goodsItem/index.vue

@@ -26,7 +26,7 @@
 </template>
 
 <script>
-import { mapGetters } from "vuex";
+import { mapGetters, mapMutations } from "vuex";
 import BuyCourseModal from "@/components/buyCourseModal/index";
 export default {
   name: "courseItem",
@@ -44,6 +44,7 @@ export default {
   },
   mounted() {},
   methods: {
+    ...mapMutations(["getCartCount"]),
     /**
      * 查看商品详情
      */
@@ -74,10 +75,21 @@ export default {
       }
 
       this.getGoodsDetail(item.goodsId).then((res) => {
-        if (res.goodsType === 1) {
-          this.$refs.selectClassModal.showModal(res);
-        }
-        if (res.goodsType === 2) {
+        if (res.templateType) {
+          if (res.goodsType === 1) {
+            this.$refs.selectClassModal.showModal(res);
+          }
+          if (res.goodsType === 2) {
+            let selectGoodsList = JSON.parse(JSON.stringify([res]));
+            localStorage.setItem(
+              "checkGoodsList",
+              JSON.stringify(selectGoodsList)
+            );
+            this.$router.push({
+              path: "/payment",
+            });
+          }
+        } else {
           let selectGoodsList = JSON.parse(JSON.stringify([res]));
           localStorage.setItem(
             "checkGoodsList",
@@ -88,11 +100,6 @@ export default {
           });
         }
       });
-
-      if (item.type === 1) {
-      }
-      if (item.type === 2) {
-      }
     },
 
     /**
@@ -148,13 +155,11 @@ export default {
   &__img {
     width: 224px;
     height: 125px;
-    background: #3f8dfd;
     border-radius: 10px 8px 8px 8px;
     background: #ffffff;
     position: absolute;
     left: 8px;
     top: -62px;
-    background: rgba(122, 136, 246, 1);
     overflow: hidden;
     .note {
       position: absolute;

+ 46 - 30
src/components/rebuildModal/index.vue

@@ -139,37 +139,53 @@ export default {
         });
     },
     rebuildSubmit() {
-      this.$confirm(
-        "如对审核结果有异议,请勿点击确认重学。致电020-87085982咨询",
-        "注意",
-        {
-          confirmButtonText: "确认重学",
-          cancelButtonText: "取消",
-          closeOnClickModal: false,
-          closeOnPressEscape: false,
-          distinguishCancelAndClose: false,
-          showClose: false,
-        }
-      )
-        .then((_) => {
-          this.$request
-            .courseperiodrebuild({
-              goodsId: this.rebuildItem.goodsId,
-              gradeId: this.rebuildItem.gradeId,
-            })
-            .then((res) => {
-              this.showRebuildDetailModal = false;
-              this.$emit("rebuildSubmit", this.rebuildItem);
-              // this.$router.push({
-              //   path: `/my-course-detail/${this.rebuildItem.goodsId}`,
-              //   query: {
-              //     gradeId: this.rebuildItem.gradeId,
-              //     orderGoodsId: this.rebuildItem.orderGoodsId,
-              //   },
-              // });
-            });
+      this.$request
+        .courseperiodrebuild({
+          goodsId: this.rebuildItem.goodsId,
+          gradeId: this.rebuildItem.gradeId,
         })
-        .catch((_) => {});
+        .then((res) => {
+          this.showRebuildDetailModal = false;
+          this.$emit("rebuildSubmit", this.rebuildItem);
+          // this.$router.push({
+          //   path: `/my-course-detail/${this.rebuildItem.goodsId}`,
+          //   query: {
+          //     gradeId: this.rebuildItem.gradeId,
+          //     orderGoodsId: this.rebuildItem.orderGoodsId,
+          //   },
+          // });
+        });
+      // this.$confirm(
+      //   "如对审核结果有异议,请勿点击确认重学。致电020-87085982咨询",
+      //   "注意",
+      //   {
+      //     confirmButtonText: "确认重学",
+      //     cancelButtonText: "取消",
+      //     closeOnClickModal: false,
+      //     closeOnPressEscape: false,
+      //     distinguishCancelAndClose: false,
+      //     showClose: false,
+      //   }
+      // )
+      //   .then((_) => {
+      //     this.$request
+      //       .courseperiodrebuild({
+      //         goodsId: this.rebuildItem.goodsId,
+      //         gradeId: this.rebuildItem.gradeId,
+      //       })
+      //       .then((res) => {
+      //         this.showRebuildDetailModal = false;
+      //         this.$emit("rebuildSubmit", this.rebuildItem);
+      //         // this.$router.push({
+      //         //   path: `/my-course-detail/${this.rebuildItem.goodsId}`,
+      //         //   query: {
+      //         //     gradeId: this.rebuildItem.gradeId,
+      //         //     orderGoodsId: this.rebuildItem.orderGoodsId,
+      //         //   },
+      //         // });
+      //       });
+      //   })
+      //   .catch((_) => {});
     },
   },
 };

+ 1 - 1
src/main.js

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

+ 21 - 4
src/pages/bank-exam-all-explain/index.vue

@@ -916,9 +916,9 @@ export default {
         } else if (item.type == 5) {
           //简答题
           //每一项都相等
-          // if (item.ques && (item.ques.imageList.length || item.ques.text)) {
-          //   return true;
-          // }
+          if (item.ques && (item.ques.imageList.length || item.ques.text)) {
+            return true;
+          }
           //判断
         } else {
           return false;
@@ -1151,7 +1151,6 @@ export default {
             }
 
             &__body {
-              border-bottom: 1px solid #eee;
               .question {
                 padding: 12px 0 0 12px;
 
@@ -1476,6 +1475,24 @@ export default {
                 }
 
                 &__content {
+                  height: 440px;
+                  overflow-y: scroll;
+
+                  &::-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;

+ 33 - 16
src/pages/bank-exam-continue/index.vue

@@ -1161,15 +1161,17 @@ export default {
       let questionOverNum = this.questionOverNum(true); //获取已经回答的题目数(包括简答和案例)
       if (this.questionList.length == questionOverNum) {
         //全部做完弹窗
-        this.$confirm("您已完成所有题目,快去交卷吧!", "提示", {
-          confirmButtonText: "立即交卷",
-          cancelButtonText: "暂不交卷",
-          type: "warning",
-        })
-          .then(() => {
-            this.examSubmit();
+        this.$nextTick(() => {
+          this.$confirm("您已完成所有题目,快去交卷吧!", "提示", {
+            confirmButtonText: "立即交卷",
+            cancelButtonText: "暂不交卷",
+            type: "warning",
           })
-          .catch(() => {});
+            .then(() => {
+              this.examSubmit();
+            })
+            .catch(() => {});
+        });
       }
     },
 
@@ -1674,6 +1676,7 @@ export default {
     },
 
     examSubmit() {
+      clearInterval(this.postTimer);
       this.loading = true;
       let score = 0; //计算总分
       let reportStatus = 0;
@@ -1697,7 +1700,9 @@ export default {
           } else {
             //错误
             item.scoreResult = 0;
-            doWrongQuestionIds.push(item.questionId);
+            if (item.ques) {
+              doWrongQuestionIds.push(item.questionId);
+            }
           }
           allScore += item.score;
           if (item.ques) {
@@ -1722,7 +1727,8 @@ export default {
             item.scoreResult = item.score;
             rightQuestionIds.push(item.questionId);
           } else {
-            let checkboxScore = item.score; //获取单题总分数
+            let hasPart = false;
+            let checkboxScore = 1; //获取单题总分数
             item.ques &&
               item.ques.forEach((ques, quesIndex) => {
                 //选错一个全扣
@@ -1744,6 +1750,7 @@ export default {
                 if (item.ques) {
                   if (item.ques.indexOf(item.ans[quesIndex]) != -1) {
                     checkboxScore += item.partScore;
+                    hasPart = true;
                   }
                 } else {
                   checkboxScore = 0;
@@ -1751,10 +1758,12 @@ export default {
               });
             }
 
-            if (checkboxScore <= 0) {
+            if (!hasPart) {
               //0分
               item.scoreResult = 0;
-              doWrongQuestionIds.push(item.questionId);
+              if (item.ques) {
+                doWrongQuestionIds.push(item.questionId);
+              }
             } else {
               //部分分
               // number++;
@@ -1779,7 +1788,9 @@ export default {
             rightQuestionIds.push(item.questionId);
           } else {
             item.scoreResult = 0;
-            doWrongQuestionIds.push(item.questionId);
+            if (item.ques) {
+              doWrongQuestionIds.push(item.questionId);
+            }
           }
           allScore += item.score;
           if (item.ques) {
@@ -1865,6 +1876,7 @@ export default {
           }, 1000);
         })
         .catch((err) => {
+          this.loading = false;
           console.log(err, "err");
         });
 
@@ -1889,6 +1901,7 @@ export default {
       let score = 0;
       let doQuestionNum = 0;
       let doQuestionIds = []; //做过的题目id
+      let lessQuestionNum = 0;
       this.questionList.forEach((item, index) => {
         if (item.type == 1) {
           if (item.ques == item.ans) {
@@ -1915,7 +1928,8 @@ export default {
             score += item.score;
             number++;
           } else {
-            let checkboxScore = item.score; //获取单题总分数
+            let hasPart = false;
+            let checkboxScore = 1; //获取单题总分数
             item.ques &&
               item.ques.forEach((ques, quesIndex) => {
                 //选错一个全扣
@@ -1937,6 +1951,7 @@ export default {
                 if (item.ques) {
                   if (item.ques.indexOf(item.ans[quesIndex]) != -1) {
                     checkboxScore += item.partScore;
+                    hasPart = true;
                   }
                 } else {
                   checkboxScore = 0;
@@ -1944,11 +1959,12 @@ export default {
               });
             }
 
-            if (checkboxScore <= 0) {
+            if (!hasPart) {
               //0分
             } else {
               //部分分
               // number++;
+              lessQuestionNum++;
               score += checkboxScore;
             }
           }
@@ -1987,6 +2003,7 @@ export default {
           orderGoodsId: this.orderGoodsId,
           doQuestionIds: doQuestionIds.join(","),
           rightQuestionNum: number,
+          lessQuestionNum: lessQuestionNum,
           moduleExamId: this.moduleId || 0,
           chapterExamId: this.chapterId || 0,
           status: 0,
@@ -2379,7 +2396,7 @@ export default {
                 }
 
                 &__content {
-                  height: 446px;
+                  height: 440px;
                   overflow-y: scroll;
 
                   &::-webkit-scrollbar {

+ 4 - 5
src/pages/bank-exam-explain/index.vue

@@ -975,9 +975,9 @@ export default {
         } else if (item.type == 5) {
           //简答题
           //每一项都相等
-          // if (item.ques && (item.ques.imageList.length || item.ques.text)) {
-          //   return true;
-          // }
+          if (item.ques && (item.ques.imageList.length || item.ques.text)) {
+            return true;
+          }
           //判断
         } else {
           return false;
@@ -1202,7 +1202,6 @@ export default {
             }
 
             &__body {
-              height: 550px;
               border-bottom: 1px solid #eee;
 
               .question {
@@ -1533,7 +1532,7 @@ export default {
                 }
 
                 &__content {
-                  height: 446px;
+                  height: 440px;
                   overflow-y: scroll;
 
                   &::-webkit-scrollbar {

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

@@ -1180,7 +1180,6 @@ export default {
             }
 
             &__body {
-              height: 550px;
               border-bottom: 1px solid #eee;
 
               .question {
@@ -1510,7 +1509,7 @@ export default {
                 }
 
                 &__content {
-                  height: 446px;
+                  height: 440px;
                   overflow-y: scroll;
 
                   &::-webkit-scrollbar {

+ 125 - 83
src/pages/bank-exam/index.vue

@@ -1124,36 +1124,40 @@ export default {
         //所有题目答完
         if (this.lastCount == 0) {
           // this.testOver = true;
-          this.$confirm("您还未交卷,确定结束做题吗?", "温馨提示", {
-            confirmButtonText: "结束做题",
-            cancelButtonText: "下次继续",
-            type: "warning",
-          })
-            .then(() => {
-              this.examSubmit();
-            })
-            .catch(() => {
-              this.examRecordEdit();
-              next();
-            });
-          //未答完
-        } else {
-          this.$confirm(
-            `您还有${this.lastCount}道题未作答, 现在继续作答,还是下次继续?`,
-            "温馨提示",
-            {
-              confirmButtonText: "继续作答",
+          this.$nextTick(() => {
+            this.$confirm("您还未交卷,确定结束做题吗?", "温馨提示", {
+              confirmButtonText: "结束做题",
               cancelButtonText: "下次继续",
               type: "warning",
-            }
-          )
-            .then(() => {
-              // confirmButton回调
             })
-            .catch(() => {
-              this.examRecordEdit();
-              next();
-            });
+              .then(() => {
+                this.examSubmit();
+              })
+              .catch(() => {
+                this.examRecordEdit();
+                next();
+              });
+          });
+          //未答完
+        } else {
+          this.$nextTick(() => {
+            this.$confirm(
+              `您还有${this.lastCount}道题未作答, 现在继续作答,还是下次继续?`,
+              "温馨提示",
+              {
+                confirmButtonText: "继续作答",
+                cancelButtonText: "下次继续",
+                type: "warning",
+              }
+            )
+              .then(() => {
+                // confirmButton回调
+              })
+              .catch(() => {
+                this.examRecordEdit();
+                next();
+              });
+          });
           // this.isLastCount = true;
         }
       } else if (this.bankType == 2) {
@@ -1163,35 +1167,39 @@ export default {
 
         //所有题目答完
         if (this.lastCount == 0) {
-          this.$confirm(`您已完成所有题目,快去交卷吧!`, "温馨提示", {
-            confirmButtonText: "立即交卷",
-            cancelButtonText: "暂不交卷",
-            type: "warning",
-          })
-            .then(() => {
-              // confirmButton回调
-              this.examSubmit();
-              next();
+          this.$nextTick(() => {
+            this.$confirm(`您已完成所有题目,快去交卷吧!`, "温馨提示", {
+              confirmButtonText: "立即交卷",
+              cancelButtonText: "暂不交卷",
+              type: "warning",
             })
-            .catch(() => {});
+              .then(() => {
+                // confirmButton回调
+                this.examSubmit();
+                next();
+              })
+              .catch(() => {});
+          });
           //未答完
         } else {
-          this.$confirm(
-            `您当前正在测试,还剩${this.lastCount}道题未完成,离开视为交卷`,
-            "温馨提示",
-            {
-              confirmButtonText: "继续离开",
-              cancelButtonText: "暂不离开",
-              type: "warning",
-            }
-          )
-            .then(() => {
-              // confirmButton回调
-              console.log(12);
-              this.leaveNow();
-              next();
-            })
-            .catch(() => {});
+          this.$nextTick(() => {
+            this.$confirm(
+              `您当前正在测试,还剩${this.lastCount}道题未完成,离开视为交卷`,
+              "温馨提示",
+              {
+                confirmButtonText: "继续离开",
+                cancelButtonText: "暂不离开",
+                type: "warning",
+              }
+            )
+              .then(() => {
+                // confirmButton回调
+                console.log(12);
+                this.leaveNow();
+                next();
+              })
+              .catch(() => {});
+          });
         }
       }
     }
@@ -1239,15 +1247,18 @@ export default {
       let questionOverNum = this.questionOverNum(true); //获取已经回答的题目数(包括简答和案例)
       if (this.questionList.length == questionOverNum) {
         //全部做完弹窗
-        this.$confirm("您已完成所有题目,快去交卷吧!", "提示", {
-          confirmButtonText: "立即交卷",
-          cancelButtonText: "暂不交卷",
-          type: "warning",
-        })
-          .then(() => {
-            this.examSubmit();
+        this.$nextTick(() => {
+          this.$confirm(`您已完成所有题目,快去交卷吧!`, "温馨提示", {
+            confirmButtonText: "立即交卷",
+            cancelButtonText: "暂不交卷",
+            type: "warning",
           })
-          .catch(() => {});
+            .then(() => {
+              // confirmButton回调
+              this.examSubmit();
+            })
+            .catch(() => {});
+        });
       }
     },
 
@@ -1471,6 +1482,8 @@ export default {
      * 离开页面统计回答正确题数
      */
     examRecordEdit() {
+      clearInterval(this.postTimer);
+      clearInterval(this.timer);
       let number = 0;
       let score = 0;
       let doQuestionNum = 0;
@@ -1502,7 +1515,8 @@ export default {
             score += item.score;
             number++;
           } else {
-            let checkboxScore = item.score; //获取单题总分数
+            let hasPart = false;
+            let checkboxScore = 1; //获取单题总分数
             item.ques &&
               item.ques.forEach((ques, quesIndex) => {
                 //选错一个全扣
@@ -1524,6 +1538,7 @@ export default {
                 if (item.ques) {
                   if (item.ques.indexOf(item.ans[quesIndex]) != -1) {
                     checkboxScore += item.partScore;
+                    hasPart = true;
                   }
                 } else {
                   checkboxScore = 0;
@@ -1531,7 +1546,7 @@ export default {
               });
             }
 
-            if (checkboxScore <= 0) {
+            if (!hasPart) {
               //0分
             } else {
               //部分分
@@ -1577,6 +1592,7 @@ export default {
           rightQuestionNum: number,
           moduleExamId: this.moduleId || 0,
           chapterExamId: this.chapterId || 0,
+          lessQuestionNum: lessQuestionNum,
           status: 0,
           doQuestionNum: doQuestionNum,
           historyExamJson: JSON.stringify(this.questionList),
@@ -2162,7 +2178,10 @@ export default {
      * 交卷,跳转报告页
      */
     examSubmit() {
+      console.log(12313);
       this.loading = true;
+      clearInterval(this.timer);
+      clearInterval(this.postTimer);
       let score = 0; //计算总分
       let reportStatus = 0;
       let number = 0; //做对的题目数量
@@ -2185,7 +2204,9 @@ export default {
           } else {
             //错误
             item.scoreResult = 0;
-            doWrongQuestionIds.push(item.questionId);
+            if (item.ques) {
+              doWrongQuestionIds.push(item.questionId);
+            }
           }
           allScore += item.score;
           if (item.ques) {
@@ -2209,7 +2230,8 @@ export default {
             item.scoreResult = item.score;
             rightQuestionIds.push(item.questionId);
           } else {
-            let checkboxScore = item.score; //获取单题总分数
+            let hasPart = false;
+            let checkboxScore = 1; //获取单题总分数
             item.ques &&
               item.ques.forEach((ques, quesIndex) => {
                 //选错一个全扣
@@ -2221,7 +2243,7 @@ export default {
                   checkboxScore = 0;
                 }
               });
-            console.log(checkboxScore);
+            console.log(checkboxScore, "checkboxScore1");
 
             //没选错
             if (checkboxScore) {
@@ -2231,17 +2253,21 @@ export default {
                 if (item.ques) {
                   if (item.ques.indexOf(item.ans[quesIndex]) != -1) {
                     checkboxScore += item.partScore;
+                    hasPart = true;
                   }
                 } else {
                   checkboxScore = 0;
                 }
               });
             }
+            console.log(checkboxScore, "checkboxScore2");
 
-            if (checkboxScore <= 0) {
+            if (!hasPart) {
               //0分
               item.scoreResult = 0;
-              doWrongQuestionIds.push(item.questionId);
+              if (item.ques) {
+                doWrongQuestionIds.push(item.questionId);
+              }
             } else {
               //部分分
               // number++;
@@ -2265,7 +2291,9 @@ export default {
             rightQuestionIds.push(item.questionId);
           } else {
             item.scoreResult = 0;
-            doWrongQuestionIds.push(item.questionId);
+            if (item.ques) {
+              doWrongQuestionIds.push(item.questionId);
+            }
           }
           allScore += item.score;
           if (item.ques) {
@@ -2333,7 +2361,6 @@ export default {
         .then((res) => {
           this.isSubmit = true;
           this.loading = false;
-          clearInterval(this.timer);
           this.$message({
             type: "success",
             message: "交卷成功",
@@ -2352,7 +2379,9 @@ export default {
             });
           }, 1000);
         })
-        .catch((err) => {});
+        .catch((err) => {
+          this.loading = false;
+        });
 
       //错题集id提交(客观题)
       this.$request
@@ -2371,6 +2400,8 @@ export default {
      * 交卷,不用跳转
      */
     leaveNow() {
+      clearInterval(this.timer);
+      clearInterval(this.postTimer);
       let score = 0; //计算总分
       let reportStatus = 0;
       let number = 0; //做对的题目数量
@@ -2394,7 +2425,9 @@ export default {
           } else {
             //错误
             item.scoreResult = 0;
-            doWrongQuestionIds.push(item.questionId);
+            if (item.ques) {
+              doWrongQuestionIds.push(item.questionId);
+            }
           }
           allScore += item.score;
           if (item.ques) {
@@ -2418,7 +2451,8 @@ export default {
             item.scoreResult = item.score;
             rightQuestionIds.push(item.questionId);
           } else {
-            let checkboxScore = item.score; //获取单题总分数
+            let hasPart = false;
+            let checkboxScore = 1; //获取单题总分数
             item.ques &&
               item.ques.forEach((ques, quesIndex) => {
                 //选错一个全扣
@@ -2430,7 +2464,7 @@ export default {
                   checkboxScore = 0;
                 }
               });
-            console.log(checkboxScore);
+            console.log(checkboxScore, "checkboxScore1");
 
             //没选错
             if (checkboxScore) {
@@ -2440,17 +2474,21 @@ export default {
                 if (item.ques) {
                   if (item.ques.indexOf(item.ans[quesIndex]) != -1) {
                     checkboxScore += item.partScore;
+                    hasPart = true;
                   }
                 } else {
                   checkboxScore = 0;
                 }
               });
             }
+            console.log(checkboxScore, "checkboxScore2");
 
-            if (checkboxScore <= 0) {
+            if (!hasPart) {
               //0分
               item.scoreResult = 0;
-              doWrongQuestionIds.push(item.questionId);
+              if (item.ques) {
+                doWrongQuestionIds.push(item.questionId);
+              }
             } else {
               //部分分
               // number++;
@@ -2474,7 +2512,9 @@ export default {
             rightQuestionIds.push(item.questionId);
           } else {
             item.scoreResult = 0;
-            doWrongQuestionIds.push(item.questionId);
+            if (item.ques) {
+              doWrongQuestionIds.push(item.questionId);
+            }
           }
           allScore += item.score;
           if (item.ques) {
@@ -2526,9 +2566,7 @@ export default {
           doTime: parseInt(this.allTimes) - parseInt(this.lastTime),
           historyExamJson: JSON.stringify(this.questionList),
         })
-        .then((res) => {
-          clearInterval(this.timer);
-        });
+        .then((res) => {});
 
       console.log(222);
       //错题集id提交(客观题)
@@ -2540,8 +2578,12 @@ export default {
           questionIds: doWrongQuestionIds,
           recordId: this.recordId,
         })
-        .then((res) => {})
-        .catch((err) => {});
+        .then((res) => {
+          this.loading = false;
+        })
+        .catch((err) => {
+          this.loading = false;
+        });
     },
   },
 };
@@ -2939,7 +2981,7 @@ export default {
                 }
 
                 &__content {
-                  height: 446px;
+                  height: 440px;
                   overflow-y: scroll;
 
                   &::-webkit-scrollbar {

+ 8 - 3
src/pages/bank-list/index.vue

@@ -181,7 +181,7 @@ export default {
       this.getSubjectList();
     }
     this.getEducationTypeList();
-    this.changeSubject();
+    // this.changeSubject();
   },
   methods: {
     ...mapMutations(["getCartCount"]),
@@ -301,7 +301,11 @@ export default {
         if (!this.params.educationTypeId) {
           this.params.educationTypeId = res.rows[0].id;
           this.getBusinessList();
+        } else {
+          this.params.educationTypeId = res.rows[0].id;
+          this.getBusinessList();
         }
+        this.changeSubject();
       });
     },
   },
@@ -326,9 +330,10 @@ export default {
 
         &__list {
           display: flex;
-          margin: 24px 0;
+          margin: 6px 0;
           align-items: flex-start;
           .left-item {
+            margin-top: 10px;
             padding: 8px 0;
             width: 80px;
             font-size: 16px;
@@ -345,7 +350,7 @@ export default {
               .item {
                 cursor: pointer;
                 border-radius: 8px;
-                margin: 0 10px;
+                margin: 10px;
                 padding: 8px 16px;
                 color: #666666;
                 font-size: 16px;

+ 5 - 1
src/pages/bank-report/index.vue

@@ -53,7 +53,7 @@
 
         <div class="section__body">
           <div class="section__body__content">
-            <div class="left-box">
+            <div class="left-box" v-if="reportdata.totalScore">
               <div class="left-box__in">
                 <div class="title">
                   试卷得分
@@ -557,6 +557,10 @@ export default {
                 border-right: 1px solid #eee;
                 padding: 5px 18px;
 
+                &:nth-last-of-type(1) {
+                  border-right: 0;
+                }
+
                 &--right {
                   border: 0;
                 }

+ 8 - 0
src/pages/cart/index.vue

@@ -37,6 +37,7 @@
             @selection-change="handleSelectionChange"
           >
             <el-table-column
+              :selectable="selectableFunc"
               type="selection"
               header-align="center"
               align="center"
@@ -145,6 +146,9 @@
             >
               <template slot-scope="scope">
                 <a class="goods_price"> ¥{{ scope.row.standPrice }} </a>
+                <div class="goods_price" v-if="scope.row.goodsStatus == 0">
+                  该商品已下架
+                </div>
               </template>
             </el-table-column>
             <el-table-column
@@ -347,6 +351,10 @@ export default {
       this.caculate();
     },
 
+    selectableFunc(row) {
+      return row.goodsStatus == 1;
+    },
+
     caculate() {
       this.total = 0;
 

+ 126 - 10
src/pages/course-detail/index.vue

@@ -2162,6 +2162,49 @@
         >
       </span>
     </el-dialog>
+
+    <el-dialog
+      title="实名验证确认"
+      :visible.sync="showConfirm"
+      width="600px"
+      class="showconfirm"
+      :close-on-click-modal="false"
+      :close-on-press-escape="false"
+      :show-close="false"
+    >
+      <div class="showconfirm__content">
+        <div class="text">
+          为避免个人信息不正确导致您的学习时长无效,请认真核对以下信息是否正确,如信息有误请取消当前操作,立刻联系020-38946666
+        </div>
+        <el-descriptions :column="1">
+          <el-descriptions-item label="姓名">{{
+            userInfo.realname
+          }}</el-descriptions-item>
+          <el-descriptions-item label="手机号">{{
+            userInfo.telphone
+          }}</el-descriptions-item>
+          <el-descriptions-item label="身份证号">{{
+            userInfo.idCard
+          }}</el-descriptions-item>
+        </el-descriptions>
+
+        <div class="">
+          <el-checkbox v-model="confirmChecked">确认个人信息无误</el-checkbox>
+        </div>
+      </div>
+      <span slot="footer" class="dialog-footer">
+        <el-button @click="$router.back(-1)">取 消</el-button>
+        <el-button
+          type="primary"
+          @click="confirmUser"
+          :disabled="confirmCount > 0"
+          :loading="confirmLoading"
+          >{{
+            confirmCount > 0 ? "确 定(" + confirmCount + ")" : "确 定"
+          }}</el-button
+        >
+      </span>
+    </el-dialog>
     <div id="printTable"></div>
     <!-- <ToolBar></ToolBar> -->
     <Footer></Footer>
@@ -2189,6 +2232,10 @@ export default {
   },
   data() {
     return {
+      confirmChecked: false,
+      confirmLoading: false,
+      confirmCount: 10,
+      showConfirm: false,
       liveDuration: 0,
       numPages: 0,
       showPdf: false,
@@ -2534,6 +2581,7 @@ export default {
 
     this.dictList();
 
+    // this.userConfirmInfoDetail().then((res) => {
     this.getbaseprofiletplists().then(async (res) => {
       // let allMenuList = await this.studyRecordMenuAllList();
       // let nowTime = Number(new Date().getTime() / 1000).toFixed(0);
@@ -2592,6 +2640,7 @@ export default {
       //   }, 1000);
       // }
     });
+    // });
   },
   beforeDestroy() {
     try {
@@ -3134,15 +3183,15 @@ export default {
         this.veryIdCard = resData.data.IdNum;
         this.veryIdName = resData.data.IdName;
 
-        if (this.infoForm.idcard) {
-          if (this.infoForm.idcard != this.veryIdCard) {
-            this.$message.warning(
-              "输入的身份证号和身份证人像面照片身份证号不匹配"
-            );
-            this.uploading = false;
-            return;
-          }
-        }
+        // if (this.infoForm.idcard) {
+        //   if (this.infoForm.idcard != this.veryIdCard) {
+        //     this.$message.warning(
+        //       "输入的身份证号和身份证人像面照片身份证号不匹配"
+        //     );
+        //     this.uploading = false;
+        //     return;
+        //   }
+        // }
 
         let base64 = await this.$tools.imageToBase64(
           this.$tools.splitImgHost(this.infoForm.recent_photos)
@@ -3418,6 +3467,53 @@ export default {
       });
     },
 
+    userConfirmInfoDetail() {
+      return new Promise((resolve) => {
+        this.$request
+          .userConfirmInfoDetail({
+            orderGoodsId: this.orderGoodsId,
+          })
+          .then((res) => {
+            if (!res.data) {
+              this.showConfirm = true;
+              let timer = setInterval(() => {
+                if (this.confirmCount > 0) {
+                  this.confirmCount--;
+                } else {
+                  clearInterval(timer);
+                  return;
+                }
+              }, 1000);
+            } else {
+              resolve();
+            }
+          });
+      });
+    },
+
+    confirmUser() {
+      if (!this.confirmChecked) {
+        this.$message.warning("请勾选确认个人信息无误");
+        return;
+      }
+      this.confirmLoading = true;
+      let infoJson = {
+        realname: this.userInfo.realname,
+        idCard: this.userInfo.idCard,
+        telphone: this.userInfo.telphone,
+      };
+      this.$request
+        .userConfirminfo({
+          infoJson: JSON.stringify(infoJson),
+          orderGoodsId: this.orderGoodsId,
+        })
+        .then((res) => {
+          this.showConfirm = false;
+          this.confirmLoading = false;
+          this.getbaseprofiletplists();
+        });
+    },
+
     getbaseprofiletplists() {
       return new Promise((resolve) => {
         let self = this;
@@ -3428,12 +3524,16 @@ export default {
           })
           .then((res) => {
             if (res.code === 200 && res.rows.length) {
+              console.log(1);
               if (res.rows[0].keyValue) {
+                console.log(2);
                 self.$request
                   .getbaseprofiletpId(self.goodsId)
                   .then((baseRes) => {
                     if (baseRes.code === 200) {
+                      console.log(3);
                       if (baseRes.data) {
+                        console.log(4);
                         self.$request
                           .getbaseprofiletpgetInfo({
                             goodsId: self.goodsId,
@@ -3447,7 +3547,9 @@ export default {
                                 (result.data.status === 3 &&
                                   result.data.changeStatus === 1)
                               ) {
+                                console.log(5);
                                 if (!result.data) {
+                                  console.log(6);
                                   self.needProfileModal = true;
 
                                   this.$confirm(`请填写资料`, "提示", {
@@ -3490,6 +3592,7 @@ export default {
                                 result.data.status === 1 &&
                                 JSON.parse(res.rows[0].keyValue2)[0]
                               ) {
+                                console.log(8);
                                 self.$request
                                   .getbaseprofileStampgetInfo({
                                     goodsId: self.goodsId,
@@ -3503,6 +3606,7 @@ export default {
                                           k.data.changeStatus === 1)
                                       ) {
                                         if (!k.data) {
+                                          console.log(9);
                                           this.$confirm(
                                             `请前往填写盖章资料`,
                                             "提示",
@@ -3523,6 +3627,7 @@ export default {
                                               this.$router.back(-1);
                                             });
                                         } else {
+                                          console.log(10);
                                           self.needProfileModal = true;
                                           this.$confirm(
                                             `资料盖章审核不通过,请前往重新填写`,
@@ -3544,6 +3649,8 @@ export default {
                                               this.$router.back(-1);
                                             });
                                         }
+                                      } else {
+                                        resolve();
                                       }
                                     }
                                   });
@@ -5767,7 +5874,7 @@ export default {
     },
 
     /**
-     * 获取业务层次详情
+     * 获取培训项目详情
      */
     courseBusiness() {
       this.$request.courseBusiness(this.goodsData.businessId).then((res) => {
@@ -6887,5 +6994,14 @@ export default {
       }
     }
   }
+
+  .showconfirm {
+    &__content {
+      .text {
+        padding-bottom: 20px;
+        color: red;
+      }
+    }
+  }
 }
 </style>

+ 15 - 7
src/pages/course-exam/index.vue

@@ -2124,7 +2124,9 @@ export default {
           } else {
             //错误
             item.scoreResult = 0;
-            doWrongQuestionIds.push(item.questionId);
+            if (item.ques) {
+              doWrongQuestionIds.push(item.questionId);
+            }
           }
           allScore += item.score;
           if (item.ques) {
@@ -2148,7 +2150,8 @@ export default {
             item.scoreResult = item.score;
             rightQuestionIds.push(item.questionId);
           } else {
-            let checkboxScore = item.score; //获取单题总分数
+            let hasPart = false;
+            let checkboxScore = 1; //获取单题总分数
             item.ques &&
               item.ques.forEach((ques, quesIndex) => {
                 //选错一个全扣
@@ -2170,6 +2173,7 @@ export default {
                 if (item.ques) {
                   if (item.ques.indexOf(item.ans[quesIndex]) != -1) {
                     checkboxScore += item.partScore;
+                    hasPart = true;
                   }
                 } else {
                   checkboxScore = 0;
@@ -2177,15 +2181,17 @@ export default {
               });
             }
 
-            if (checkboxScore <= 0) {
+            if (!hasPart) {
               //0分
               item.scoreResult = 0;
-              lessQuestionNum++;
-              // doWrongQuestionIds.push(item.questionId);
+              if (item.ques) {
+                doWrongQuestionIds.push(item.questionId);
+              }
             } else {
               //部分分
               // number++;
-              doWrongQuestionIds.push(item.questionId);
+              lessQuestionNum++;
+              // doWrongQuestionIds.push(item.questionId);
               item.scoreResult = checkboxScore;
               score += checkboxScore;
               // rightQuestionIds.push(item.questionId)
@@ -2204,7 +2210,9 @@ export default {
             rightQuestionIds.push(item.questionId);
           } else {
             item.scoreResult = 0;
-            doWrongQuestionIds.push(item.questionId);
+            if (item.ques) {
+              doWrongQuestionIds.push(item.questionId);
+            }
           }
           allScore += item.score;
           if (item.ques) {

+ 3 - 2
src/pages/course-list/index.vue

@@ -344,9 +344,10 @@ export default {
 
         &__list {
           display: flex;
-          margin: 24px 0;
+          margin: 6px 0;
           align-items: flex-start;
           .left-item {
+            margin-top: 10px;
             padding: 8px 0;
             width: 80px;
             font-size: 16px;
@@ -363,7 +364,7 @@ export default {
               .item {
                 cursor: pointer;
                 border-radius: 8px;
-                margin: 0 10px;
+                margin: 10px;
                 padding: 8px 16px;
                 color: #666666;
                 font-size: 16px;

+ 3 - 2
src/pages/goods-detail/bank-detail.vue

@@ -1724,7 +1724,8 @@ export default {
             item.showList = false;
             item.list = [];
           });
-          Module.showList = !Module.showList;
+
+          this.$set(Module, "showList", !Module.showList);
           Module.list = res.data;
         });
     },
@@ -1742,7 +1743,7 @@ export default {
           goodsId: this.goodsId,
         })
         .then((res) => {
-          chapter.showList = !chapter.showList;
+          this.$set(chapter, "showList", !chapter.showList);
           chapter.list = res.data;
         });
     },

+ 2 - 2
src/pages/goods-detail/course-detail.vue

@@ -1151,7 +1151,7 @@ export default {
      * 展开模块卷
      */
     openModule(Module) {
-      Module.showList = !Module.showList;
+      this.$set(Module, "showList", !Module.showList);
       if (!Module.list.length) {
         this.getChapterList(Module);
       }
@@ -1177,7 +1177,7 @@ export default {
      * 展开章卷
      */
     openChapter(chapter) {
-      chapter.showList = !chapter.showList;
+      this.$set(chapter, "showList", !chapter.showList);
 
       if (!chapter.list.length) {
         this.getSectionList(chapter);

+ 3 - 8
src/pages/home/index.vue

@@ -346,7 +346,7 @@
             "
             class="text_align"
           >
-            该业务层次无推荐课程
+            该培训项目无推荐课程
           </p>
           <ul v-else class="list clearfix">
             <template v-for="(item, index) in goodsList1[active1].goodsList">
@@ -388,7 +388,7 @@
             "
             class="text_align"
           >
-            该业务层次无推荐题库
+            该培训项目无推荐题库
           </p>
           <ul v-else class="list clearfix">
             <template v-for="(item, index) in goodsList2[active2].goodsList">
@@ -577,7 +577,6 @@ export default {
     // this.color = this.colors[0];
     this.advertisingList();
     this.educationTypeList();
-    this.advertisingHomeLocation();
   },
   watch: {
     userInfo(val) {
@@ -679,11 +678,6 @@ export default {
         });
       }
     },
-    advertisingHomeLocation() {
-      this.$request.advertisingHomeLocation().then((res) => {
-        this.swiperOptions.autoplay.delay = res.data.intervalTime * 1000;
-      });
-    },
     /**
      * 查看商品详情
      */
@@ -801,6 +795,7 @@ export default {
           locationKey: "home-banner", //首页轮播KEY
         })
         .then((res) => {
+          this.swiperOptions.autoplay.delay = res.data[0].intervalTime * 1000;
           /**
            * 如果存在-调用轮播图列表
            */

+ 3 - 0
src/pages/login/index.vue

@@ -972,6 +972,7 @@ export default {
             })
             .catch((err) => {
               this.islogin = false;
+              console.log(err, "err");
               this.$message({
                 message: err.msg,
                 type: "error",
@@ -1097,6 +1098,7 @@ export default {
           this.islogin = false;
           this.isloginSms = false;
           this.setUserInfo(res.data);
+          console.log(this.currentRouter);
           if (JSON.stringify(this.currentRouter) != "{}") {
             this.$router.push(this.currentRouter);
             this.setCurrentRouter({});
@@ -1108,6 +1110,7 @@ export default {
           this.isRegister = false;
           this.islogin = false;
           this.isloginSms = false;
+          console.log(err, "err");
           this.$message({
             message: err.msg,
             type: "error",

+ 20 - 13
src/pages/payment-success/index.vue

@@ -11,7 +11,10 @@
           <div class="order-msg">
             <div class="order-msg__body">
               <div class="goods_item">订单编号:{{ orderSn }}</div>
-              <div class="goods_item">订单金额:{{ total | toFixed }} 元</div>
+              <div class="goods_item">
+                订单金额:
+                <span>{{ total | toFixed }} 元</span>
+              </div>
 
               <div class="links" v-if="isBK">
                 <a @click="go('/person-center/my-course')">返回我的网课</a>
@@ -119,23 +122,27 @@ export default {
     },
   },
   mounted() {
-    this.orderSn = this.$route.params.orderSn;
-    this.total = this.$route.params.total;
+    this.orderSn = this.$route.query.orderSn;
+    // this.total = this.$route.params.total;
     this.isBK = this.$route.query.isBK;
-    this.goodsId = this.$route.params.goodsId;
-    this.gradeId = this.$route.params.gradeId;
-    this.orderGoodsId = this.$route.params.orderGoodsId;
+    this.goodsId = this.$route.query.goodsId;
+    this.gradeId = this.$route.query.gradeId;
+    this.orderGoodsId = this.$route.query.orderGoodsId;
     if (this.goodsId) {
-      this.$request
-        .commonGoodsDetail(this.$route.params.goodsId)
-        .then((res) => {
-          this.goodsDetail = res.data;
-          this.getRecommend();
-        });
+      this.$request.commonGoodsDetail(this.goodsId).then((res) => {
+        this.goodsDetail = res.data;
+        this.getRecommend();
+      });
     }
-    console.log(this.$route, "this.$route.params");
+
+    this.orderDetail();
   },
   methods: {
+    orderDetail() {
+      this.$request.orderDetail(this.orderSn).then((res) => {
+        this.total = res.data.orderPrice;
+      });
+    },
     addCart(status, goodsId) {
       if (!this.$tools.isLogin()) {
         this.setCurrentRouter(this.$route);

+ 96 - 18
src/pages/payment/index.vue

@@ -18,7 +18,7 @@
               <!-- <div class="desc">订单详情▼</div> -->
             </div>
 
-            <div class="order-msg__body">
+            <div class="order-msg__body" v-else>
               <div
                 class="goods_item"
                 v-for="(goodsItem, goodsIndex) in checkGoodsList"
@@ -124,13 +124,21 @@ export default {
     console.log(this.$route, "this.$route.params");
     this.isBK = this.$route.query.isBK;
     let checkGoodsList = localStorage.getItem("checkGoodsList");
+    if (!this.$tools.isLogin()) {
+      this.setCurrentRouter(this.$route);
+      this.$router.push({
+        path: "/login",
+      });
+      return;
+    }
     if (!checkGoodsList && !this.$route.params.orderSn) {
-      this.$router.push({ path: "/" });
+      this.$router.push({ path: "/person-center/my-order" });
       return;
     } else {
       if (this.$route.params.orderSn) {
         this.orderSn = this.$route.params.orderSn;
         this.total = this.$route.params.total;
+        this.orderGoodsList();
       } else if (checkGoodsList) {
         this.checkGoodsList = JSON.parse(checkGoodsList);
         this.caculate();
@@ -138,6 +146,7 @@ export default {
     }
   },
   methods: {
+    ...mapMutations(["setCurrentRouter"]),
     refreshCode() {
       if (this.lastTime > 0) {
         return;
@@ -181,9 +190,17 @@ export default {
       this.total = 0;
       this.checkGoodsList.forEach((item) => {
         this.total += item.standPrice;
-        console.log(this.total);
       });
     },
+    orderGoodsList() {
+      this.$request
+        .orderGoodsList({
+          orderSn: this.orderSn,
+        })
+        .then((res) => {
+          this.checkGoodsList = res.rows;
+        });
+    },
 
     pay() {
       if (this.radio == 1) {
@@ -216,21 +233,67 @@ export default {
           this.loading.close();
           localStorage.removeItem("checkGoodsList");
           console.log(res);
-          this.urlBase64 = res.data.urlBase64;
-          this.orderSn = res.data.orderSn;
-          this.qrCodeShow = true;
-          this.checkOrderTimer = setInterval(() => {
-            this.orderPayStatus();
-          }, 2000);
-          this.lastTime = 60;
-          this.countTimer = setInterval(() => {
-            if (this.lastTime <= 0) {
-              clearInterval(this.countTimer);
-              clearInterval(this.checkOrderTimer);
-              return;
+
+          //0元商品
+          if (this.total == 0) {
+            this.orderSn = res.data.orderSn;
+            if (this.isBK) {
+              this.$router.replace({
+                path: "/payment-success",
+                name: "支付成功",
+                params: {
+                  orderSn: this.orderSn,
+                  total: this.total,
+                  isBK: this.isBK,
+                  goodsId: this.checkGoodsList[0].learnGoodsId,
+                  gradeId: this.checkGoodsList[0].learnGradeId,
+                  orderGoodsId: this.checkGoodsList[0].learnOrderGoodsId,
+                },
+                query: {
+                  orderSn: this.orderSn,
+                  isBK: this.isBK,
+                  goodsId: this.checkGoodsList[0].learnGoodsId,
+                  gradeId: this.checkGoodsList[0].learnGradeId,
+                  orderGoodsId: this.checkGoodsList[0].learnOrderGoodsId,
+                },
+              });
+            } else {
+              this.$router.replace({
+                path: "/payment-success",
+                name: "支付成功",
+                params: {
+                  goodsId: this.checkGoodsList[0].goodsId,
+                  gradeId: this.checkGoodsList[0].gradeId,
+                  orderGoodsId: this.checkGoodsList[0].orderGoodsId,
+                  orderSn: this.orderSn,
+                  total: this.total,
+                },
+                query: {
+                  goodsId: this.checkGoodsList[0].goodsId,
+                  gradeId: this.checkGoodsList[0].gradeId,
+                  orderGoodsId: this.checkGoodsList[0].orderGoodsId,
+                  orderSn: this.orderSn,
+                },
+              });
             }
-            this.lastTime--;
-          }, 1000);
+            return;
+          } else {
+            this.urlBase64 = res.data.urlBase64;
+            this.orderSn = res.data.orderSn;
+            this.qrCodeShow = true;
+            this.checkOrderTimer = setInterval(() => {
+              this.orderPayStatus();
+            }, 2000);
+            this.lastTime = 60;
+            this.countTimer = setInterval(() => {
+              if (this.lastTime <= 0) {
+                clearInterval(this.countTimer);
+                clearInterval(this.checkOrderTimer);
+                return;
+              }
+              this.lastTime--;
+            }, 1000);
+          }
         })
         .catch((err) => {
           this.loading.close();
@@ -290,7 +353,9 @@ export default {
         .then((res) => {
           if (res.data) {
             clearInterval(this.checkOrderTimer);
+            console.log(1);
             if (this.isBK) {
+              console.log(2);
               this.$router.replace({
                 path: "/payment-success",
                 name: "支付成功",
@@ -303,10 +368,15 @@ export default {
                   orderGoodsId: this.checkGoodsList[0].learnOrderGoodsId,
                 },
                 query: {
+                  orderSn: this.orderSn,
                   isBK: this.isBK,
+                  goodsId: this.checkGoodsList[0].learnGoodsId,
+                  gradeId: this.checkGoodsList[0].learnGradeId,
+                  orderGoodsId: this.checkGoodsList[0].learnOrderGoodsId,
                 },
               });
             } else {
+              console.log(3);
               this.$router.replace({
                 path: "/payment-success",
                 name: "支付成功",
@@ -317,13 +387,21 @@ export default {
                   orderSn: this.orderSn,
                   total: this.total,
                 },
+                query: {
+                  goodsId: this.checkGoodsList[0].goodsId,
+                  gradeId: this.checkGoodsList[0].gradeId,
+                  orderGoodsId: this.checkGoodsList[0].orderGoodsId,
+                  orderSn: this.orderSn,
+                },
               });
             }
 
             console.log(this.checkGoodsList);
           }
         })
-        .catch((err) => {});
+        .catch((err) => {
+          console.log(err, "err");
+        });
     },
   },
 };

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

@@ -744,7 +744,7 @@ export default {
       this.$request
         .appCommonActivityRecommendList({
           businessId: this.goodsDetail.businessId,
-          type: 1,
+          type: 2,
         })
         .then((res) => {
           if (res.rows.length) {
@@ -1002,7 +1002,7 @@ export default {
       this.$request
         .wrongRecordList({
           paperId: this.wrongSelect,
-          orderGoodsId: this.orderGoodsId,
+          goodsId: this.goodsId,
         })
         .then((res) => {
           this.wrongExamList = res.rows;
@@ -1018,7 +1018,7 @@ export default {
       this.$request
         .wrongRecordTypeList({
           paperId: this.wrongSelect,
-          orderGoodsId: this.orderGoodsId,
+          goodsId: this.goodsId,
         })
         .then((res) => {
           this.wrongTypeList = res.rows;
@@ -1049,7 +1049,7 @@ export default {
       this.$request
         .goodsCollectExamList({
           paperId: this.collectSelect,
-          orderGoodsId: this.orderGoodsId,
+          goodsId: this.goodsId,
         })
         .then((res) => {
           this.collectExamList = res.rows;
@@ -1069,7 +1069,7 @@ export default {
       this.$request
         .collectQuestionTypeList({
           paperId: this.wrongSelect,
-          orderGoodsId: this.orderGoodsId,
+          goodsId: this.goodsId,
         })
         .then((res) => {
           this.collectTypeList = res.rows;

+ 8 - 7
src/pages/person-center/my-bank/bank-explain-detail/index.vue

@@ -21,6 +21,10 @@
           </div>
           <div class="explain-record__body">
             <div class="left-box">
+              <div class="left-box__footer">
+                <div class="btn" @click="prevQuestion">上一题</div>
+                <div class="btn" @click="nextQuestion">下一题</div>
+              </div>
               <div class="left-box__body">
                 <template v-for="(question, questionIndex) in questionList">
                   <div
@@ -633,11 +637,6 @@
                   </div>
                 </template>
               </div>
-
-              <div class="left-box__footer">
-                <div class="btn" @click="prevQuestion">上一题</div>
-                <div class="btn" @click="nextQuestion">下一题</div>
-              </div>
             </div>
             <div class="right-box">
               <div class="right-box__header">答题卡</div>
@@ -685,7 +684,6 @@
                   </div>
                 </div>
               </div>
-              <div class="right-box__footer"></div>
             </div>
           </div>
         </div>
@@ -749,6 +747,9 @@ export default {
     }
   },
   methods: {
+    changeIndex(index) {
+      this.current = index;
+    },
     tabChange(e) {
       if (this.activeName == e.name) return;
       this.activeName = e.name;
@@ -1155,7 +1156,7 @@ export default {
             }
 
             &__body {
-              height: 490px;
+              min-height: 490px;
               border-bottom: 1px solid #eee;
 
               .question {

+ 72 - 27
src/pages/person-center/my-bank/bank-statistics/index.vue

@@ -109,15 +109,30 @@
                               <div class="title">{{ section.examName }}</div>
                             </div>
                             <div class="num">
-                              {{
-                                section.totalQuestionNum != 0
-                                  ? (
-                                      (section.rightQuestionNum /
-                                        section.totalQuestionNum) *
-                                      100
-                                    ).toFixed(0) + "%"
-                                  : 0 + "%"
-                              }}
+                              <!-- 练习 -->
+                              <template v-if="section.doType == 1">
+                                {{
+                                  section.doQuestionNum != 0
+                                    ? (
+                                        (section.rightQuestionNum /
+                                          section.doQuestionNum) *
+                                        100
+                                      ).toFixed(0) + "%"
+                                    : 0 + "%"
+                                }}
+                              </template>
+                              <!-- 考试 -->
+                              <template v-if="section.doType == 2">
+                                {{
+                                  section.totalQuestionNum != 0
+                                    ? (
+                                        (section.rightQuestionNum /
+                                          section.totalQuestionNum) *
+                                        100
+                                      ).toFixed(0) + "%"
+                                    : 0 + "%"
+                                }}
+                              </template>
                             </div>
                             <div class="num">
                               {{
@@ -166,15 +181,30 @@
                               <div class="title">{{ section.examName }}</div>
                             </div>
                             <div class="num">
-                              {{
-                                section.totalQuestionNum != 0
-                                  ? (
-                                      (section.rightQuestionNum /
-                                        section.totalQuestionNum) *
-                                      100
-                                    ).toFixed(0) + "%"
-                                  : 0 + "%"
-                              }}
+                              <!-- 练习 -->
+                              <template v-if="section.doType == 1">
+                                {{
+                                  section.doQuestionNum != 0
+                                    ? (
+                                        (section.rightQuestionNum /
+                                          section.doQuestionNum) *
+                                        100
+                                      ).toFixed(0) + "%"
+                                    : 0 + "%"
+                                }}
+                              </template>
+                              <!-- 考试 -->
+                              <template v-if="section.doType == 2">
+                                {{
+                                  section.totalQuestionNum != 0
+                                    ? (
+                                        (section.rightQuestionNum /
+                                          section.totalQuestionNum) *
+                                        100
+                                      ).toFixed(0) + "%"
+                                    : 0 + "%"
+                                }}
+                              </template>
                             </div>
                             <div class="num">
                               {{
@@ -204,15 +234,30 @@
                           <div class="title">{{ item.name }}</div>
                         </div>
                         <div class="num">
-                          {{
-                            item.totalQuestionNum != 0
-                              ? (
-                                  (item.rightQuestionNum /
-                                    item.totalQuestionNum) *
-                                  100
-                                ).toFixed(0) + "%"
-                              : 0 + "%"
-                          }}
+                          <!-- 练习 -->
+                          <template v-if="item.doType == 1">
+                            {{
+                              item.doQuestionNum != 0
+                                ? (
+                                    (item.rightQuestionNum /
+                                      item.doQuestionNum) *
+                                    100
+                                  ).toFixed(0) + "%"
+                                : 0 + "%"
+                            }}
+                          </template>
+                          <!-- 考试 -->
+                          <template v-if="item.doType == 2">
+                            {{
+                              item.totalQuestionNum != 0
+                                ? (
+                                    (item.rightQuestionNum /
+                                      item.totalQuestionNum) *
+                                    100
+                                  ).toFixed(0) + "%"
+                                : 0 + "%"
+                            }}
+                          </template>
                         </div>
                         <div class="num">
                           {{ item.doQuestionNum + "/" + item.totalQuestionNum }}

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

@@ -258,13 +258,13 @@ export default {
               color: #333333;
 
               &-line {
-                width: 220px;
+                width: 250px;
                 display: inline-block;
               }
 
               /deep/ .el-progress-bar {
-                padding-right: 70px;
-                margin-right: -70px;
+                padding-right: 100px;
+                margin-right: -100px;
               }
             }
           }

+ 12 - 4
src/pages/person-center/my-classhour/index/index.vue

@@ -46,10 +46,18 @@
                 <div class="text">
                   <div class="title">{{ item.goodsName }}</div>
                   <div class="desc desc--black" v-if="item.periodStatus === 1">
-                    机构已审核通过,需等待注册中心复审后即可获得继续教育学时。审核时间约15个工作日,届时请前往官网申请证书延期。
-                    <div class="copy-btn">
-                      <a @click="copy">复制官网链接</a>
-                    </div>
+                    <template
+                      v-if="
+                        item.educationName == '继续教育' &&
+                        item.businessName == '二级' &&
+                        item.projectName == '建造师'
+                      "
+                    >
+                      机构已审核通过,需等待注册中心复审后即可获得继续教育学时。审核时间约15个工作日,届时请前往官网申请证书延期。
+                      <div class="copy-btn">
+                        <a @click="copy">复制官网链接</a>
+                      </div>
+                    </template>
                   </div>
                   <div class="desc" v-if="item.periodStatus === -1">
                     您的学时还未修完,请尽快完成课程学习

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

@@ -47,7 +47,9 @@
                     !(item.classStartTime && item.classStartTime > sysTime)
                   "
                 >
-                  <template v-if="item.periodStatus == -1">
+                  <template
+                    v-if="item.periodStatus == -1 || item.periodStatus == 2"
+                  >
                     <template
                       v-if="item.classStatus == 1 || item.classStatus === null"
                     >
@@ -58,21 +60,28 @@
                         "
                       >
                         学习状态:
-                        <div class="note" v-if="item.stuAllNum == 0">
+                        <div
+                          class="note"
+                          v-if="item.stuAllNum + item.recordNum == 0"
+                        >
                           未学习
                         </div>
                         <div
                           class="note note--yellow"
                           v-else-if="
-                            item.stuAllNum > 0 &&
-                            item.stuAllNum < item.secAllNum
+                            item.stuAllNum + item.recordNum > 0 &&
+                            item.stuAllNum + item.recordNum <
+                              item.secAllNum + item.examNum
                           "
                         >
                           学习中
                         </div>
                         <div
                           class="note note--green"
-                          v-else-if="item.stuAllNum >= item.secAllNum"
+                          v-else-if="
+                            item.stuAllNum + item.recordNum >=
+                            item.secAllNum + item.examNum
+                          "
                         >
                           已学完
                         </div>
@@ -117,10 +126,10 @@
                       >机构审核:
                       <div class="note">学时审核不通过</div>
                     </template>
-                    <template v-else-if="item.periodStatus == 2"
+                    <!-- <template v-else-if="item.periodStatus == 2"
                       >机构审核:
                       <div class="note note--yellow">学时待审核</div></template
-                    >
+                    > -->
                     <template v-else-if="item.periodStatus == 1">
                       <template v-if="item.periodPlush > 0"
                         ><div class="note note--green">
@@ -671,6 +680,7 @@ export default {
         query: {
           gradeId: item.gradeId,
           orderGoodsId: item.orderGoodsId,
+          rebuild: 1,
         },
       });
     },

+ 5 - 2
src/pages/person-center/my-order/index.vue

@@ -144,8 +144,11 @@
               </div>
               <div class="refund-wrap">
                 <div class="btns">
-                  <div class="price-text">已退款</div>
-                  <div class="price-number">¥{{ item.refundFee }}</div>
+                  <template v-if="!item.wxpay_refund_id"> 退款失败 </template>
+                  <template v-else>
+                    <div class="price-text">已退款</div>
+                    <div class="price-number">¥{{ item.refundFee }}</div>
+                  </template>
                 </div>
               </div>
             </template>

+ 21 - 116
src/pages/person-center/play-record/index.vue

@@ -27,7 +27,7 @@
                     {{ sectionItem.sectionName }}
                     <!-- <div class="note">60学时</div> -->
                   </div>
-                  <div class="progress">
+                  <div class="progress" v-if="sectionItem.sectionType != 2">
                     学习进度
                     <el-progress
                       class="progress-line"
@@ -69,84 +69,20 @@
       </div>
     </div>
 
-    <el-dialog
-      width="800px"
-      class="rebuild"
-      :visible.sync="showRebuildDetailModal"
-      :close-on-click-modal="false"
-      :close-on-press-escape="false"
-      :show-close="false"
-    >
-      <div class="rebuild__content">
-        <div class="rebuild__close" @click="showRebuildDetailModal = false">
-          X
-        </div>
-        <div class="rebuild__header">审核详情</div>
-        <div class="rebuild__body">
-          <div class="content">
-            <div class="content__header">
-              <div class="title">重要提示:</div>
-              <div class="desc">
-                您的学时审核不通过,不通过原因如下,请查阅,并重学不通过的课程内容。
-              </div>
-            </div>
-
-            <div class="content__body">
-              <div class="list">
-                <div
-                  class="list__item"
-                  v-for="(item, index) in rebuildItems"
-                  :key="index"
-                >
-                  <div class="title">
-                    <span class="note" v-if="item.type == 0"> 测试 </span>
-                    <span class="note note--yellow" v-if="item.type == 1"
-                      >录播</span
-                    >
-                    <span class="note note--yellow" v-if="item.type == 2"
-                      >直播</span
-                    >
-                    <span class="note note--yellow" v-if="item.type == 3"
-                      >回放</span
-                    >
-                    {{ index + 1 }}、{{ item.name }}
-                  </div>
-                  <div class="desc">
-                    <!-- <div class="imgs">
-                      <div
-                        class="img"
-                        v-for="(items, indexs) in item.userStudyRecordPhoto"
-                        :key="indexs"
-                      >
-                        <img :src="$tools.splitImgHost(items.photo)" />
-                        <div class="note">
-                          {{ $tools.timestampToTime(items.createTime, false) }}
-                        </div>
-                      </div>
-                    </div> -->
-                  </div>
-                  <div class="desc">
-                    原因:
-                    <span class="note">{{ item.auditReason }}</span>
-                  </div>
-                </div>
-              </div>
-            </div>
-          </div>
-        </div>
-        <div class="rebuild__footer">
-          <el-button class="confirm" @click="rebuildSubmit" type="primary"
-            >确认已阅读</el-button
-          >
-        </div>
-      </div>
-    </el-dialog>
+    <RebuildModal
+      ref="rebuildModal"
+      @rebuildSubmit="rebuildSubmit($event)"
+    ></RebuildModal>
   </div>
 </template>
 
 <script>
+import RebuildModal from "@/components/rebuildModal";
 export default {
   name: "MyCourse",
+  components: {
+    RebuildModal,
+  },
   data() {
     return {
       activeName: "1",
@@ -159,7 +95,6 @@ export default {
         pageSize: 10,
       },
       sysTime: 0,
-      showRebuildDetailModal: false,
     };
   },
   mounted() {
@@ -182,37 +117,14 @@ export default {
     },
 
     rebuildSubmit() {
-      this.$confirm(
-        "如对审核结果有异议,请勿点击确认重学。致电020-87085982咨询",
-        "注意",
-        {
-          confirmButtonText: "确认重学",
-          cancelButtonText: "取消",
-          closeOnClickModal: false,
-          closeOnPressEscape: false,
-          distinguishCancelAndClose: false,
-          showClose: false,
-        }
-      )
-        .then((_) => {
-          this.$request
-            .courseperiodrebuild({
-              goodsId: this.rebuildItem.goodsId,
-              gradeId: this.rebuildItem.gradeId,
-            })
-            .then((res) => {
-              this.showRebuildDetailModal = false;
-              this.$router.push({
-                path: `/my-course-detail/${this.rebuildItem.goodsId}`,
-                query: {
-                  gradeId: this.rebuildItem.gradeId,
-                  orderGoodsId: this.rebuildItem.orderGoodsId,
-                  rebuild: 1,
-                },
-              });
-            });
-        })
-        .catch((_) => {});
+      this.$router.push({
+        path: `/my-course-detail/${item.goodsId}`,
+        query: {
+          gradeId: item.gradeId,
+          orderGoodsId: item.orderGoodsId,
+          rebuild: 1,
+        },
+      });
     },
     currentChange(e) {
       this.params.pageNum = e;
@@ -312,17 +224,10 @@ export default {
           );
 
           if (rebuildStatus == 0) {
-            this.rebuildItem = item;
-            this.$request
-              .getcourseperiodcheat({
-                goodsId: item.goodsId,
-                gradeId: item.gradeId,
-              })
-              .then((res) => {
-                this.rebuildItems = res.rows;
-              });
-            this.showRebuildDetailModal = true;
-            return;
+            if (rebuildStatus == 0) {
+              this.$refs.rebuildModal.showModal(item);
+              return;
+            }
           }
 
           if (item.educationName == "继续教育") {

+ 1 - 1
src/pages/subject/collect-bank.vue

@@ -2054,7 +2054,7 @@ export default {
                 }
 
                 &__content {
-                  height: 446px;
+                  height: 440px;
                   overflow-y: scroll;
 
                   &::-webkit-scrollbar {

+ 1 - 1
src/pages/subject/collect-type-bank.vue

@@ -2050,7 +2050,7 @@ export default {
                 }
 
                 &__content {
-                  height: 446px;
+                  height: 440px;
                   overflow-y: scroll;
 
                   &::-webkit-scrollbar {

+ 1 - 1
src/pages/subject/wrong-bank.vue

@@ -2062,7 +2062,7 @@ export default {
                 }
 
                 &__content {
-                  height: 446px;
+                  height: 440px;
                   overflow-y: scroll;
 
                   &::-webkit-scrollbar {

+ 1 - 1
src/pages/subject/wrong-type-bank.vue

@@ -2053,7 +2053,7 @@ export default {
                 }
 
                 &__content {
-                  height: 446px;
+                  height: 440px;
                   overflow-y: scroll;
 
                   &::-webkit-scrollbar {

+ 126 - 126
src/router/index.js

@@ -491,155 +491,155 @@ router.beforeEach((to,from,next) => {
         store.dispatch('getUserInfo')
       }
 
-      // // //题库页面要检测是否需要锁定
-      // let isBankLock = bankAdmin.some(item => {
-      //   return to.path.indexOf(item) != -1
-      // })
-      // console.log(isBankLock,'isBankLock')
-      // if(isBankLock) {
+      // //题库页面要检测是否需要锁定
+      let isBankLock = bankAdmin.some(item => {
+        return to.path.indexOf(item) != -1
+      })
+      console.log(isBankLock,'isBankLock')
+      if(isBankLock) {
         
-      //   //没有执行定时器,开启锁定
-      //   if(!canToBank) {
-      //     request
-      //       .lockLockStatus({
-      //         action: "bank",
-      //         uuid:tools.getUuid()
-      //       })
-      //       .then((res) => {
-      //         //有其他端在操作,不能学习
-      //         Message({
-      //           type: "warning",
-      //           message: res.msg,
-      //         });
+        //没有执行定时器,开启锁定
+        if(!canToBank) {
+          request
+            .lockLockStatus({
+              action: "bank",
+              uuid:tools.getUuid()
+            })
+            .then((res) => {
+              //有其他端在操作,不能学习
+              Message({
+                type: "warning",
+                message: res.msg,
+              });
               
-      //         if(from.path=='/') {
-      //           next('/')
-      //         }
+              if(from.path=='/') {
+                next('/')
+              }
 
-      //       }).catch(err => {
-      //         //可以学习,开启锁定
-      //           canToBank = 1;
-      //         request.lockLockAction({
-      //           action:'bank',
-      //           uuid:tools.getUuid()
-      //         }).then(res => {
-      //         })
-      //         canToBank = setInterval(() => {
-      //           request.lockLockAction({
-      //             action:'bank',
-      //             uuid:tools.getUuid()
-      //           }).then(res => {
+            }).catch(err => {
+              //可以学习,开启锁定
+                canToBank = 1;
+              request.lockLockAction({
+                action:'bank',
+                uuid:tools.getUuid()
+              }).then(res => {
+              })
+              canToBank = setInterval(() => {
+                request.lockLockAction({
+                  action:'bank',
+                  uuid:tools.getUuid()
+                }).then(res => {
                   
-      //           })
-      //         }, 10000);
-      //         next()
-      //       })
+                })
+              }, 10000);
+              next()
+            })
 
-      //       return;
-      //   } else {
-      //     //正在执行定时器,可以直接进入
-      //     next()
-      //   }
+            return;
+        } else {
+          //正在执行定时器,可以直接进入
+          next()
+        }
         
-      //   return;
-      // } else {
-      //   //从题库页面离开删除锁定
+        return;
+      } else {
+        //从题库页面离开删除锁定
 
-      //   let isLeaveBank = bankAdmin.some(item => {
-      //     return from.path.indexOf(item) != -1
-      //   })
+        let isLeaveBank = bankAdmin.some(item => {
+          return from.path.indexOf(item) != -1
+        })
 
-      //   if(isLeaveBank) {
+        if(isLeaveBank) {
           
-      //     clearInterval(canToBank)
-      //     canToBank = null;
-      //     request.lockDelLock({
-      //       action:'bank',
-      //       uuid:tools.getUuid()
-      //     }).then(res => {
+          clearInterval(canToBank)
+          canToBank = null;
+          request.lockDelLock({
+            action:'bank',
+            uuid:tools.getUuid()
+          }).then(res => {
             
-      //     })
-      //   }
-      // }
+          })
+        }
+      }
       
-      // let isCourseLock = courseAdmin.some(item => {
-      //   return to.path.indexOf(item) != -1
-      // })
+      let isCourseLock = courseAdmin.some(item => {
+        return to.path.indexOf(item) != -1
+      })
 
-      // console.log(isCourseLock,'isCourseLock')
-      // if(isCourseLock) {
+      console.log(isCourseLock,'isCourseLock')
+      if(isCourseLock) {
         
-      //   //没有执行定时器,开启锁定
-      //   if(!canToCourse) {
+        //没有执行定时器,开启锁定
+        if(!canToCourse) {
           
-      //     request.goodsDetail(to.params.goodsId).then(res => {
-      //       //继续教育锁定
-      //       if(res.data.educationName == '继续教育') {
-      //         request
-      //           .lockLockStatus({
-      //             action: "jxjy",
-      //             uuid:tools.getUuid()
-      //           })
-      //           .then((res) => {
-      //             //有其他端在操作,不能学习
-      //             Message({
-      //               type: "warning",
-      //               message: res.msg,
-      //             });
+          request.goodsDetail(to.params.goodsId).then(res => {
+            //继续教育锁定
+            if(res.data.educationName == '继续教育') {
+              request
+                .lockLockStatus({
+                  action: "jxjy",
+                  uuid:tools.getUuid()
+                })
+                .then((res) => {
+                  //有其他端在操作,不能学习
+                  Message({
+                    type: "warning",
+                    message: res.msg,
+                  });
                   
-      //             if(from.path=='/') {
-      //               next('/')
-      //             }
+                  if(from.path=='/') {
+                    next('/')
+                  }
 
-      //           }).catch(err => {
-      //             //可以学习,开启锁定
-      //             canToCourse = 1;
-      //             request.lockLockAction({
-      //               action:'jxjy',
-      //               uuid:tools.getUuid()
-      //             }).then(res => {
-      //             })
-      //             canToCourse = setInterval(() => {
-      //               request.lockLockAction({
-      //                 action:'jxjy',
-      //                 uuid:tools.getUuid()
-      //               }).then(res => {
+                }).catch(err => {
+                  //可以学习,开启锁定
+                  canToCourse = 1;
+                  request.lockLockAction({
+                    action:'jxjy',
+                    uuid:tools.getUuid()
+                  }).then(res => {
+                  })
+                  canToCourse = setInterval(() => {
+                    request.lockLockAction({
+                      action:'jxjy',
+                      uuid:tools.getUuid()
+                    }).then(res => {
                       
-      //               })
-      //             }, 10000);
-      //             next()
-      //           })
-      //       } else {
-      //         next()
-      //       }
-      //     })
+                    })
+                  }, 10000);
+                  next()
+                })
+            } else {
+              next()
+            }
+          })
           
 
-      //       return;
-      //   } else {
-      //     //正在执行定时器,可以直接进入
-      //     next()
-      //   }
+            return;
+        } else {
+          //正在执行定时器,可以直接进入
+          next()
+        }
         
-      //   return;
-      // } else {
-      //   //非题库页面删除锁定
-      //   let isLeaveCouese = courseAdmin.some(item => {
-      //     return from.path.indexOf(item) != -1
-      //   })
+        return;
+      } else {
+        //非题库页面删除锁定
+        let isLeaveCouese = courseAdmin.some(item => {
+          return from.path.indexOf(item) != -1
+        })
 
-      //   if(isLeaveCouese) {
+        if(isLeaveCouese) {
           
-      //     clearInterval(canToCourse)
-      //     canToCourse = null;
-      //     request.lockDelLock({
-      //       action:'jxjy',
-      //       uuid:tools.getUuid()
-      //     }).then(res => {
+          clearInterval(canToCourse)
+          canToCourse = null;
+          request.lockDelLock({
+            action:'jxjy',
+            uuid:tools.getUuid()
+          }).then(res => {
             
-      //     })
-      //   }
-      // }
+          })
+        }
+      }
       
       next()
     } else {