Forráskód Böngészése

模块卷 章卷拍照不够处理逻辑

Tang 2 éve
szülő
commit
52b8f40d15
1 módosított fájl, 12 hozzáadás és 0 törlés
  1. 12 0
      src/pages/course-exam/index.vue

+ 12 - 0
src/pages/course-exam/index.vue

@@ -1143,6 +1143,7 @@ export default {
   mixins: [myMixins],
   data() {
     return {
+      openPhotoStatus: 0,
       hasTake: false,
       recordId: 0,
       tabIndex: "1",
@@ -1526,6 +1527,11 @@ export default {
           this.hasTake = true;
           // console.log(res, "拍照提交结果");
           self.ossAvatarUrl = "";
+          if (this.openPhotoStatus == 1) {
+            this.openPhotoStatus = 0;
+            this.examSubmit();
+            return;
+          }
           //拍照
           if (this.lastTime) {
             this.timer = setInterval(() => {
@@ -2561,6 +2567,12 @@ export default {
           }, 1000);
         })
         .catch(err => {
+          if (err.code === 559) {
+            this.$message.error(err.msg);
+            console.log("拍照不够触发");
+            this.openPhotoStatus = 1;
+            this.openPhoto();
+          }
           console.log(err, "err");
         });