浏览代码

修复bug

chenxiong 3 年之前
父节点
当前提交
1b4bab95f3

二进制
src/assets/qrcode.png


+ 6 - 0
src/mixin/index.js

@@ -16,5 +16,11 @@ export default {
         });
       },
     },
+
+    beforeDestroy() {
+      try {
+        this.$msgbox.close();
+      } catch (err) {}
+    },
   
   }

+ 20 - 0
src/pages/bank-exam/index.vue

@@ -939,6 +939,25 @@ export default {
     await this.bankExam();
     this.goodsQuestionList();
   },
+
+  beforeDestroy() {
+    clearInterval(this.timer);
+    try {
+      this.$msgbox.close();
+    } catch (err) {}
+  },
+  beforeRouteLeave(to, from, next) {
+    this.$confirm("系统可能不会保存您所做的更改。", "离开此页面?", {
+      confirmButtonText: "离开",
+      cancelButtonText: "取消",
+      type: "warning",
+    })
+      .then(() => {
+        // confirmButton回调
+        next();
+      })
+      .catch(() => {});
+  },
   methods: {
     ...mapMutations(["setExamResult"]),
     toFixed(num) {
@@ -2010,6 +2029,7 @@ export default {
         })
         .then((res) => {
           this.isSubmit = true;
+          clearInterval(this.timer);
           this.$message({
             type: "success",
             message: "交卷成功",

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

@@ -154,6 +154,7 @@
 import Footer from "@/components/footer/index";
 import Header from "@/components/header/index";
 import ToolBar from "@/components/toolbar/index";
+import { mapMutations } from "vuex";
 export default {
   name: "PaymentSuccess",
   components: {
@@ -189,6 +190,7 @@ export default {
     this.changeSubject();
   },
   methods: {
+    ...mapMutations(["getCartCount"]),
     search(key) {
       this.params.searchKey = key || "";
       this.params.projectId = "";
@@ -219,6 +221,7 @@ export default {
       this.$request
         .addCart({ goodsId: item.goodsId })
         .then((res) => {
+          this.getCartCount();
           this.$message({
             message: "加入购物车成功",
             type: "success",

+ 2 - 2
src/pages/bank-report/index.vue

@@ -41,9 +41,9 @@
         <template v-else>
           <div class="section__header" v-if="reportdata.doTime">
             <div class="desc">
-              答题时长:{{ $tools.secondToTime(reportdata.examTime) }}
+              总时间:{{ $tools.secondToTime(reportdata.examTime) }}
               <span class="note"
-                >交卷时间:{{
+                >答题时长:{{
                   $tools.secondToTime(reportdata.doTime, false)
                 }}</span
               >

+ 74 - 21
src/pages/course-detail/index.vue

@@ -1248,7 +1248,7 @@
                           <div class="left-box">
                             <div
                               class="textarea clearfix"
-                              v-if="isPlayRebuild > 0"
+                              v-if="!(isPlayRebuild > 0)"
                             >
                               <el-input
                                 resize="none"
@@ -1978,6 +1978,7 @@ export default {
   },
   data() {
     return {
+      liveDuration: 0,
       numPages: 0,
       showPdf: false,
       // 总页数
@@ -2017,6 +2018,7 @@ export default {
       courseTabIndex: "1",
       goodsId: "",
       gradeId: "",
+      livingTimer: null,
       sectionItem: {},
       gradeDetail: {},
       playTime: 0, //页面播放时长,不含暂停
@@ -2297,7 +2299,9 @@ export default {
     try {
       this.$msgbox.close();
     } catch (err) {}
-
+    if (this.playSectionId) {
+      this.postStudyRecord();
+    }
     if (this.lockTimer) {
       clearInterval(this.lockTimer);
       this.$request
@@ -2326,10 +2330,15 @@ export default {
             });
             this.takePhotoModal = false;
             this.isTaking = false;
+            this.loading = false;
             var polyvPlayerContext = this.player;
             if (polyvPlayerContext) {
               polyvPlayerContext.j2s_resumeVideo();
             }
+            var polyvPlayerContext = this.playerzb;
+            if (polyvPlayerContext) {
+              polyvPlayerContext.j2s_resumeVideo();
+            }
           })
           .catch((err) => {
             this.loading = false;
@@ -3648,6 +3657,10 @@ export default {
         this.player.destroy();
       }
       this.player = "";
+      if (this.playerzb) {
+        this.playerzb.destroy();
+      }
+      this.playerzb = "";
       this.vidzb = "";
       this.nowTime = Number(new Date().getTime() / 1000).toFixed(0);
       this.courseDetail(); //课程详情
@@ -4292,6 +4305,7 @@ export default {
       });
     },
     loadPlayerzb() {
+      var self = this;
       const polyvLivePlayer = window.polyvLivePlayer;
       this.playerzb = polyvLivePlayer({
         wrap: "#playerzb",
@@ -4300,6 +4314,16 @@ export default {
         uid: this.uidzb,
         vid: this.vidzb,
       });
+      console.log(this.playerzb);
+      this.livingTimer = setInterval(self.timeEventLiving, 1000);
+
+      this.playerzb.on("s2j_onPlayOver", () => {
+        this.$message({
+          type: "success",
+          message: "播放完毕",
+        });
+        this.postStudyRecord(1);
+      });
     },
     loadPlayer() {
       var self = this;
@@ -4311,29 +4335,31 @@ export default {
           height: 455,
           speed: 2,
           vid: self.vid,
+          teaser_show: 1,
+          tail_show: 1,
+          hideSwitchPlayer: true,
           watchStartTime: this.recordObj.videoCurrentTime,
           autoplay: true,
-          teaser_show: 0,
           ts: res.data.ts,
           sign: res.data.sign,
-          adMatter: [
-            {
-              // 广告参数详细配置
-              location: 1, //广告位置: 1 片头广告,2 暂停广告,3 片尾广告,4 弹窗广告
-              adtype: 2, //广告资源类型: 1 图片广告,2 视频广告,3 swf广告(flash播放器生效)
-              matterurl: "https://www.runoob.com/try/demo_source/movie.mp4", //广告资源URL
-              timesize: 5, //广告时长,单位:秒
-              skipenabled: false, //是否显示跳过按钮
-            },
-            {
-              // 广告参数详细配置
-              location: 3, //广告位置: 1 片头广告,2 暂停广告,3 片尾广告,4 弹窗广告
-              adtype: 2, //广告资源类型: 1 图片广告,2 视频广告,3 swf广告(flash播放器生效)
-              matterurl: "https://www.runoob.com/try/demo_source/movie.mp4", //广告资源URL
-              timesize: 5, //广告时长,单位:秒
-              skipenabled: false, //是否显示跳过按钮
-            },
-          ],
+          // adMatter: [
+          //   {
+          //     // 广告参数详细配置
+          //     location: 1, //广告位置: 1 片头广告,2 暂停广告,3 片尾广告,4 弹窗广告
+          //     adtype: 2, //广告资源类型: 1 图片广告,2 视频广告,3 swf广告(flash播放器生效)
+          //     matterurl: "https://www.runoob.com/try/demo_source/movie.mp4", //广告资源URL
+          //     timesize: 5, //广告时长,单位:秒
+          //     skipenabled: false, //是否显示跳过按钮
+          //   },
+          //   {
+          //     // 广告参数详细配置
+          //     location: 3, //广告位置: 1 片头广告,2 暂停广告,3 片尾广告,4 弹窗广告
+          //     adtype: 2, //广告资源类型: 1 图片广告,2 视频广告,3 swf广告(flash播放器生效)
+          //     matterurl: "https://www.runoob.com/try/demo_source/movie.mp4", //广告资源URL
+          //     timesize: 5, //广告时长,单位:秒
+          //     skipenabled: false, //是否显示跳过按钮
+          //   },
+          // ],
           playsafe: function (vid, next) {
             next();
           },
@@ -4357,6 +4383,26 @@ export default {
       });
     },
 
+    timeEventLiving() {
+      var polyvPlayerContext = this.playerzb;
+      if (polyvPlayerContext) {
+        this.liveDuration = this.liveDuration + 1; //每隔1秒
+        console.log(this.liveDuration);
+        if (this.liveDuration == 2) {
+          //直播第2秒拍照
+          if (
+            this.goodsPhotographConfig.livephotograph == 1 &&
+            this.sectionItem.learning != 1
+          ) {
+            //开启直播拍照
+
+            polyvPlayerContext.j2s_pauseVideo();
+            this.openPhoto();
+          }
+        }
+      }
+    },
+
     timeEvent() {
       let self = this;
       var polyvPlayerContext = this.player;
@@ -4429,6 +4475,13 @@ export default {
         }
       }
 
+      var polyvPlayerContext = this.playerzb;
+      if (polyvPlayerContext) {
+        if (this.isFullScreen()) {
+          this.exitFullscreen();
+        }
+      }
+
       this.$nextTick(() => {
         if (
           (window.navigator.mediaDevices &&

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

@@ -869,6 +869,7 @@
             v-if="!isTaking"
             class="take"
             @click="reTake"
+            :loading="loading"
             >重拍</el-button
           >
           <el-button
@@ -876,6 +877,7 @@
             v-if="!isTaking"
             class="take"
             @click="takeOk"
+            :loading="loading"
             >确认</el-button
           >
         </div>
@@ -930,6 +932,7 @@ export default {
       takePhotoModal: false,
       isTaking: true, //是否正在拍照
       stream: null,
+      loading: false,
     };
   },
   async mounted() {
@@ -1161,6 +1164,7 @@ export default {
     },
 
     async takeOk() {
+      this.loading = true;
       let compareFaceData = await this.faceRecognition();
 
       if (compareFaceData == 0) {
@@ -1170,6 +1174,7 @@ export default {
         });
 
         setTimeout(() => {
+          this.loading = false;
           this.reTake();
         }, 2000);
         return;
@@ -1177,25 +1182,14 @@ export default {
 
       if (compareFaceData >= 80) {
         const waitYS = await this.imageInfos();
-        this.postCoursePhotoRecord()
-          .then((res) => {
-            this.postStudyRecord(); //提交记录
-            //恢复播放
-          })
-          .catch((err) => {
-            console.log(err, "err");
-            this.$message({
-              type: "warning",
-              message: "上传接口报错,请重新拍照上传",
-            });
-            this.reTake();
-          });
+        this.postStudyRecord(); //提交记录
       }
 
       this.$message({
         type: "success",
         message: "拍照成功",
       });
+      this.loading = false;
       this.takePhotoModal = false;
       this.isTaking = true;
     },
@@ -1309,6 +1303,13 @@ export default {
           .then((res) => {
             console.log(res, "res");
             resolve(res.data);
+          })
+          .catch((err) => {
+            this.loading = false;
+            this.$message({
+              type: "warning",
+              message: err.msg,
+            });
           });
       });
     },
@@ -2080,6 +2081,7 @@ export default {
         })
         .then((res) => {
           this.isSubmit = true;
+          clearInterval(this.timer);
           this.$message({
             type: "success",
             message: "交卷成功",

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

@@ -154,6 +154,7 @@
 import Footer from "@/components/footer/index";
 import Header from "@/components/header/index";
 import ToolBar from "@/components/toolbar/index";
+import { mapMutations } from "vuex";
 export default {
   name: "PaymentSuccess",
   components: {
@@ -190,6 +191,7 @@ export default {
     this.changeSubject();
   },
   methods: {
+    ...mapMutations(["getCartCount"]),
     search(key) {
       this.params.searchKey = key || "";
       this.params.projectId = "";
@@ -217,6 +219,7 @@ export default {
       this.$request
         .addCart({ goodsId: item.goodsId })
         .then((res) => {
+          this.getCartCount();
           this.$message({
             message: "加入购物车成功",
             type: "success",

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

@@ -1028,7 +1028,7 @@ export default {
     this.getGoodsBankList();
   },
   methods: {
-    ...mapMutations(["setCheckGoodsList", "setCurrentRouter"]),
+    ...mapMutations(["setCheckGoodsList", "setCurrentRouter", "getCartCount"]),
     /**
      * @param {Object}
      * 单选点击确认
@@ -1621,6 +1621,7 @@ export default {
       this.$request
         .addCart({ goodsId: this.goodsId })
         .then((res) => {
+          this.getCartCount();
           this.$message({
             message: "加入购物车成功",
             type: "success",
@@ -1780,6 +1781,7 @@ export default {
             padding: 0 20px !important;
             height: 80px;
             line-height: 80px;
+            font-size: 18px;
           }
 
           .detail {

+ 56 - 7
src/pages/goods-detail/course-detail.vue

@@ -46,6 +46,12 @@
                     <div class="detail" v-html="goodsDetail.pcDetailHtml"></div>
                   </el-tab-pane>
                   <el-tab-pane label="章节目录" name="2">
+                    <div slot="label" style="position: relative">
+                      <span class="label">章节目录</span>
+                      <span v-if="listenConfigList.length" class="view-note"
+                        >试看</span
+                      >
+                    </div>
                     <div class="goods-menu clearfix">
                       <div class="left-box">
                         <div class="left-box__body">
@@ -130,7 +136,9 @@
                                             </div>
                                             <div
                                               v-if="section.tryListen"
-                                              @click="toDo(section)"
+                                              @click="
+                                                toDo(section, item.courseId)
+                                              "
                                               class="btn"
                                             >
                                               试看
@@ -179,7 +187,9 @@
                                             </div>
                                             <div
                                               v-if="section.tryListen"
-                                              @click="toDo(section)"
+                                              @click="
+                                                toDo(section, item.courseId)
+                                              "
                                               class="btn"
                                             >
                                               试看
@@ -200,7 +210,7 @@
                                         </div>
                                         <div
                                           v-if="item.tryListen"
-                                          @click="toDo(item)"
+                                          @click="toDo(item, item.courseId)"
                                           class="btn"
                                         >
                                           试看
@@ -443,6 +453,8 @@ export default {
       },
       applyAreas: [],
       provinceList: [],
+      sectionItem: {},
+      playCourseId: 0,
     };
   },
   mounted() {
@@ -454,7 +466,7 @@ export default {
     }
   },
   methods: {
-    ...mapMutations(["setCheckGoodsList", "setCurrentRouter"]),
+    ...mapMutations(["setCheckGoodsList", "setCurrentRouter", "getCartCount"]),
     /**
      * 点击课程大目录
      */
@@ -704,14 +716,17 @@ export default {
     /**
      * 试看
      */
-    toDo(section) {
+    toDo(section, courseId) {
       this.videoModalShow = true;
+      this.playCourseId = courseId;
+      console.log(this.playCourseId, "playCourseId");
       this.initVideo(section);
     },
 
     async initVideo(option) {
       await this.clears();
       console.log(option);
+      this.sectionItem = option;
       if (option.sectionType === 2) {
         this.vidzb = option.liveUrl;
         this.loadPlayerScriptzb(this.loadPlayerzb);
@@ -733,6 +748,16 @@ export default {
     loadPlayer() {
       var self = this;
       const polyvPlayer = window.polyvPlayer;
+      let auditionMinute = this.listenConfigList.find((item) => {
+        if (
+          item.sectionId ==
+            (this.sectionItem.sectionId || this.sectionItem.menuId) &&
+          item.courseId == this.playCourseId
+        ) {
+          return true;
+        }
+      }).auditionMinute;
+
       self.$request.obtainpolyvvideosign(self.vid).then((res) => {
         self.player = polyvPlayer({
           wrap: "#player",
@@ -740,7 +765,7 @@ export default {
           height: 450,
           vid: self.vid,
           start: 0,
-          end: 30,
+          end: auditionMinute,
           teaser_show: 0,
           ts: res.data.ts,
           sign: res.data.sign,
@@ -1204,6 +1229,7 @@ export default {
       this.$request
         .addCart({ goodsId: this.goodsId })
         .then((res) => {
+          this.getCartCount();
           this.$message({
             message: "加入购物车成功",
             type: "success",
@@ -1226,7 +1252,7 @@ export default {
         if (res.data.pcDetailHtml) {
           res.data.pcDetailHtml = res.data.pcDetailHtml.replace(
             /<img/gi,
-            '<img style="max-width:100%;max-height:400px;"'
+            '<img style="max-width:100%;"'
           );
         }
         this.goodsDetail = res.data;
@@ -1240,6 +1266,10 @@ export default {
           for (var itemChild of this.listenConfigList) {
             this.goodsAuditionConfigIdList.push(itemChild.sectionId); //存储试听节ID
           }
+          console.log(
+            this.goodsAuditionConfigIdList,
+            "this.goodsAuditionConfigIdList"
+          );
         }
       });
     },
@@ -1388,6 +1418,25 @@ export default {
             padding: 0 20px !important;
             height: 80px;
             line-height: 80px;
+            font-size: 18px;
+          }
+
+          .label {
+            font-size: 18px;
+          }
+
+          .view-note {
+            width: 40px;
+            height: 24px;
+            background: #ff3b30;
+            border-radius: 4px 4px 0px 4px;
+            border: 1px solid #ff3b30;
+            text-align: center;
+            line-height: 22px;
+            color: #fff;
+            position: absolute;
+            right: -10px;
+            top: 5px;
           }
 
           .detail {

+ 2 - 1
src/pages/home/index.vue

@@ -565,7 +565,7 @@ export default {
     this.advertisingHomeLocation();
   },
   methods: {
-    ...mapMutations(["setUserInfo"]),
+    ...mapMutations(["setUserInfo", "getCartCount"]),
 
     search() {
       if (!this.searchKey.trim()) {
@@ -653,6 +653,7 @@ export default {
         .addCart({ goodsId: item.goodsId })
         .then((res) => {
           if (res) {
+            this.getCartCount();
             this.$message({
               message: "加入购物车成功",
               type: "success",

+ 81 - 22
src/pages/payment/index.vue

@@ -67,12 +67,19 @@
       class="qrcode"
     >
       <div class="qrcode__body">
-        <div class="img">
-          <img :src="urlBase64" alt="" />
+        <div class="img" @click="refreshCode">
+          <img
+            :src="lastTime <= 0 ? require('@/assets/qrcode.png') : urlBase64"
+            alt=""
+          />
         </div>
-        <!-- <p>距离二维码过期还剩<span>60</span>秒</p>
+        <p v-if="lastTime > 0">
+          距离二维码过期还剩<span>{{ lastTime }}</span
+          >秒
+        </p>
+        <p v-else>二维码已过期,点击图片重新获取二维码</p>
         <p>过期后请刷新重新获取二维码</p>
-        <p>客服电话:020-12345678</p> -->
+        <p>客服电话:020-12345678</p>
       </div>
     </el-dialog>
 
@@ -95,6 +102,7 @@ export default {
   },
   data() {
     return {
+      lastTime: 60,
       radio: "1",
       qrCodeShow: false,
       total: 0,
@@ -102,12 +110,14 @@ export default {
       orderSn: "",
       checkOrderTimer: null,
       loading: null,
+      countTimer: null,
     };
   },
   computed: {
     ...mapGetters(["checkGoodsList"]),
   },
   beforeDestroy() {
+    clearInterval(this.countTimer);
     clearInterval(this.checkOrderTimer);
   },
   mounted() {
@@ -126,6 +136,33 @@ export default {
   },
   methods: {
     ...mapMutations(["setCheckGoodsList"]),
+    refreshCode() {
+      if (this.lastTime > 0) {
+        return;
+      }
+      this.$request
+        .orderResumePCOrder({ orderSn: this.orderSn })
+        .then((res) => {
+          this.loading.close();
+          this.urlBase64 = res.data.urlBase64;
+          this.orderSn = res.data.orderSn;
+          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();
+        });
+    },
     closePay() {
       console.log(999);
       this.$confirm("确定离开支付页面吗", "提示", {
@@ -182,27 +219,39 @@ export default {
           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();
-          if (err.code == 510) {
-            this.$confirm(err.msg + "。点击确定跳转待支付订单列表", "提示", {
-              confirmButtonText: "确定",
-              cancelButtonText: "取消",
-            })
-              .then((_) => {
-                this.$router.push({
-                  path: "/person-center/my-order",
-                });
+
+          setTimeout(() => {
+            if (err.code == 510) {
+              this.$confirm(err.msg + "。点击确定跳转待支付订单列表", "提示", {
+                confirmButtonText: "确定",
+                cancelButtonText: "取消",
               })
-              .catch((_) => {});
-            // this.qrCodeShow = true;
-          } else {
-            this.$message({
-              type: "warning",
-              message: err.msg,
-            });
-          }
+                .then((_) => {
+                  this.$router.push({
+                    path: "/person-center/my-order",
+                  });
+                })
+                .catch((_) => {});
+              // this.qrCodeShow = true;
+            } else {
+              this.$message({
+                type: "warning",
+                message: err.msg,
+              });
+            }
+          }, 500);
         });
     },
 
@@ -217,9 +266,18 @@ export default {
           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();
+          // this.loading.close();
         });
     },
 
@@ -381,6 +439,7 @@ export default {
   .qrcode {
     &__body {
       .img {
+        cursor: pointer;
         margin: 0 auto;
         width: 180px;
         height: 180px;

+ 12 - 1
src/pages/person-center/my-classhour/appointment-add-kp/index.vue

@@ -37,9 +37,20 @@
             <el-select v-model="timeIndex" placeholder="请选择">
               <el-option
                 :label="
-                  item.dataTime + ' ' + item.startTime + ' ~ ' + item.endTime
+                  item.dataTime +
+                  ' ' +
+                  item.startTime +
+                  ' ~ ' +
+                  item.endTime +
+                  `已报:${item.registration}/ ${item.num} ` +
+                  (item.status === 2
+                    ? '预约名额已满'
+                    : item.status === 1
+                    ? '此时段您已经有其他考试预约'
+                    : '')
                 "
                 :value="index"
+                :disabled="item.status !== 0"
                 v-for="(item, index) in activeList"
                 :key="index"
               ></el-option>

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

@@ -59,6 +59,7 @@
 </template>
 
 <script>
+import { mapMutations } from "vuex";
 export default {
   name: "appointment",
   data() {
@@ -79,6 +80,7 @@ export default {
     this.getApplysubscribe();
   },
   methods: {
+    ...mapMutations(["setCheckGoodsList"]),
     getApplysubscribe() {
       var data = {
         goodsId: this.goodsId,
@@ -148,12 +150,26 @@ export default {
                   }
                 )
                   .then((_) => {
+                    console.log(this.goodsIdBK, "this.goodsIdBK");
                     if (!this.goodsIdBK) {
-                      uni.showModal({
-                        showCancel: false,
-                        content: "请联系管理员配置补考商品",
-                      });
+                      this.$message.warning("请联系管理员配置补考商品");
                     } else {
+                      this.$request
+                        .commonGoodsDetail(this.goodsIdBK)
+                        .then((res) => {
+                          let detail = res.data;
+                          let selectGoodsList = JSON.parse(
+                            JSON.stringify([detail])
+                          );
+
+                          this.setCheckGoodsList(selectGoodsList);
+                          this.$router.push({
+                            path: "/payment",
+                            query: {
+                              isBK: "1",
+                            },
+                          });
+                        });
                     }
                     // this.$router.push({
                     //   path: "/payment-success",

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

@@ -694,44 +694,44 @@ export default {
       }
 
       if (item.educationName == "继续教育") {
+        // this.$request
+        //   .lockLockStatus({
+        //     action: "jxjy",
+        //   })
+        //   .then((res) => {
+        //     //有其他端在操作,不能学习
+        //     this.$message({
+        //       type: "warning",
+        //       message: res.msg,
+        //     });
+        //   })
+        //   .catch((err) => {
+        //可以学习
         this.$request
-          .lockLockStatus({
-            action: "jxjy",
+          .courseCourseList({
+            pageNum: 1,
+            pageSize: 1,
+            goodsId: item.goodsId,
+            gradeId: item.gradeId,
           })
           .then((res) => {
-            //有其他端在操作,不能学习
-            this.$message({
-              type: "warning",
-              message: res.msg,
-            });
-          })
-          .catch((err) => {
-            //可以学习
-            this.$request
-              .courseCourseList({
-                pageNum: 1,
-                pageSize: 1,
-                goodsId: item.goodsId,
-                gradeId: item.gradeId,
-              })
-              .then((res) => {
-                if (res.rows.length) {
-                  this.$router.push({
-                    path: `/my-course-detail/${item.goodsId}`,
-                    query: {
-                      gradeId: item.gradeId,
-                      orderGoodsId: item.orderGoodsId,
-                      courseId: res.rows[0].courseId || "",
-                    },
-                  });
-                } else {
-                  this.$message({
-                    type: "warning",
-                    message: "课程内暂无可以学习的科目",
-                  });
-                }
+            if (res.rows.length) {
+              this.$router.push({
+                path: `/my-course-detail/${item.goodsId}`,
+                query: {
+                  gradeId: item.gradeId,
+                  orderGoodsId: item.orderGoodsId,
+                  courseId: res.rows[0].courseId || "",
+                },
+              });
+            } else {
+              this.$message({
+                type: "warning",
+                message: "课程内暂无可以学习的科目",
               });
+            }
           });
+        // });
       } else {
         this.$request
           .courseCourseList({
@@ -761,7 +761,17 @@ export default {
     },
 
     appBeforeAddress(item) {
-      this.showExercisesModal = true;
+      this.$request
+        .appBeforeAddress({
+          // goodsId,
+          orderGoodsId: item.orderGoodsId,
+        })
+        .then((res) => {
+          this.showExercisesModal = true;
+        })
+        .catch((err) => {
+          this.$message.warning(err.msg);
+        });
     },
 
     rebuildSubmit() {

+ 1 - 0
src/pages/person-center/my-examination/index.vue

@@ -460,6 +460,7 @@ export default {
       );
       //报名开放时间”过了“结束时间点”,【取消预约】按钮隐藏
       if (item.applyEndTime <= timestamp) {
+        console.log(999);
         return false;
       } else {
         //报名开放时间-进行中,【前培标记:已开通】,【取消预约】按钮隐藏

+ 42 - 37
src/pages/person-center/my-invoice/add/index.vue

@@ -364,45 +364,50 @@ export default {
           this.$request
             .orderInvoice(data)
             .then((res) => {
-              this.loading = false;
-              this.orderInvoiceCanInvoiceList();
-              this.form = {
-                type: "1",
-                subject: "1",
-                invoiceTitle: "",
-                orderGoodsIds: [],
-                taxRegistryNumber: "",
-                companyAddress: "",
-                phone: "",
-                bankName: "",
-                bankAccount: "",
-                receivingAddress: "",
-                receivingName: "",
-                receivingTel: "",
-              };
+              // this.form = {
+              //   type: "1",
+              //   subject: "1",
+              //   invoiceTitle: "",
+              //   orderGoodsIds: [],
+              //   taxRegistryNumber: "",
+              //   companyAddress: "",
+              //   phone: "",
+              //   bankName: "",
+              //   bankAccount: "",
+              //   receivingAddress: "",
+              //   receivingName: "",
+              //   receivingTel: "",
+              // };
+
+              this.$refs.form.resetFields();
               this.total = 0;
 
-              const confirmText = [
-                "您本次的发票申请已经提交成功!",
-                "机构将在3-7个工作日内进行处理,处理结果会在【发票记录】显示,请留意进度。",
-              ];
-              const newDatas = [];
-              const h = this.$createElement;
-              for (const i in confirmText) {
-                newDatas.push(h("p", null, confirmText[i]));
-              }
-              this.$confirm(h("div", null, newDatas), "操作提示", {
-                confirmButtonText: "知道了",
-                closeOnClickModal: false,
-                showCancelButton: false,
-                closeOnPressEscape: false,
-                distinguishCancelAndClose: false,
-                showClose: false,
-              })
-                .then((_) => {})
-                .catch((_) => {
-                  console.log(_);
-                });
+              this.$nextTick(() => {
+                const confirmText = [
+                  "您本次的发票申请已经提交成功!",
+                  "机构将在3-7个工作日内进行处理,处理结果会在【发票记录】显示,请留意进度。",
+                ];
+                const newDatas = [];
+                const h = this.$createElement;
+                for (const i in confirmText) {
+                  newDatas.push(h("p", null, confirmText[i]));
+                }
+                this.$confirm(h("div", null, newDatas), "操作提示", {
+                  confirmButtonText: "知道了",
+                  closeOnClickModal: false,
+                  showCancelButton: false,
+                  closeOnPressEscape: false,
+                  distinguishCancelAndClose: false,
+                  showClose: false,
+                })
+                  .then((_) => {
+                    this.loading = false;
+                    this.orderInvoiceCanInvoiceList();
+                  })
+                  .catch((_) => {
+                    console.log(_);
+                  });
+              });
             })
             .catch((err) => {
               this.loading = false;