Tang 1 gadu atpakaļ
vecāks
revīzija
c40794103e
2 mainītis faili ar 15 papildinājumiem un 6 dzēšanām
  1. 7 5
      src/components/videoCy/index.vue
  2. 8 1
      src/pages/course-exam/index.vue

+ 7 - 5
src/components/videoCy/index.vue

@@ -247,9 +247,9 @@ export default {
     //施工继教
     ShiPhotoList(totalVideoTime) {
       //施工继教带年份的订单拍照设置
-      if(totalVideoTime < 2760){
+      if (totalVideoTime < 2760) {
         var time1 = 46 * 60 - 1; //拍照间隔多久一张 46分钟
-      }else{
+      } else {
         var time1 = 45 * 60 - 1; //拍照间隔多久一张 45分钟
       }
       let num = Math.ceil(totalVideoTime / time1); //拍照数量
@@ -527,12 +527,12 @@ export default {
       );
     },
     //播放出现错误时触发
-    onPlayerError() {
+    onPlayerError(title, msg) {
       this.$router.go(-1);
       this.$notify.error({
         duration: 0,
-        title: "错误",
-        message: "视频播放错误,请及时反馈教务人员处理"
+        title: title || "错误",
+        message: msg || "视频播放错误,请及时反馈教务人员处理"
       });
     },
     //发生业务逻辑错误
@@ -689,6 +689,8 @@ export default {
               }, 1500);
             } else if (err.code === 558) {
               this.$refs.countDown.openBoxs(parseInt(err.msg.split(",")[1]));
+            } else if (err.code === 601) {
+              this.onPlayerError("提交异常", err.msg);
             } else {
               this.$message.error(err.msg || "未知错误");
             }

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

@@ -1391,7 +1391,7 @@ export default {
         });
         this.$request
           .bankRecord({
-            fromPlat:2,//"来源平台 1小程序 2PC网站 3h5"
+            fromPlat: 2, //"来源平台 1小程序 2PC网站 3h5"
             courseId: this.courseId,
             chapterId: this.chapterId || 0,
             moduleId: this.moduleId || 0,
@@ -1417,6 +1417,13 @@ export default {
               }
               resolve();
             }
+          })
+          .catch(err => {
+            if (err.code === 601) {
+              this.mustBackPage(err.msg);
+            } else {
+              this.$message.error(err.msg || "未知错误");
+            }
           });
       });
     },