Browse Source

进入考试时防止断网造成流程中断

Michael Wang 6 years ago
parent
commit
2f209b41c6

+ 1 - 1
src/features/OnlineExam/Examing/ExamingHome.vue

@@ -281,7 +281,7 @@ export default {
     async realSubmitPaper() {
     async realSubmitPaper() {
       this.$Spin.show({
       this.$Spin.show({
         render: () => {
         render: () => {
-          return <div style="font-size: 50px">正在交卷,请耐心等待...</div>;
+          return <div style="font-size: 44px">正在交卷,请耐心等待...</div>;
         }
         }
       });
       });
       if (this.faceEnable) {
       if (this.faceEnable) {

+ 11 - 0
src/features/OnlineExam/OnlineExamList.vue

@@ -86,6 +86,10 @@ export default {
         this.$Message.error("IP受限,请到中心指定地点进行考试!");
         this.$Message.error("IP受限,请到中心指定地点进行考试!");
         return;
         return;
       }
       }
+      if (ipLimit === undefined) {
+        this.spinShow = false;
+        return;
+      }
 
 
       // TODO: 待确认. 前端控制展示“是否进入考试”。后端控制不在有效期内不准访问。
       // TODO: 待确认. 前端控制展示“是否进入考试”。后端控制不在有效期内不准访问。
       if (course.faceEnable) {
       if (course.faceEnable) {
@@ -104,12 +108,19 @@ export default {
             course.examId +
             course.examId +
             `/IS_FACE_VERIFY`
             `/IS_FACE_VERIFY`
         );
         );
+        if (faceLiveness.data === undefined) {
+          this.spinShow = false;
+          return;
+        }
         if (faceLiveness.data) {
         if (faceLiveness.data) {
           this.processingMessage = "正在检测底照是否满足活体检测标准...";
           this.processingMessage = "正在检测底照是否满足活体检测标准...";
           const checkBasePhoto = (await this.$http.get(
           const checkBasePhoto = (await this.$http.get(
             "/api/ecs_oe_student/examFaceLivenessVerify/checkFaceLiveness"
             "/api/ecs_oe_student/examFaceLivenessVerify/checkFaceLiveness"
           )).data;
           )).data;
           this.spinShow = false;
           this.spinShow = false;
+          if (checkBasePhoto === undefined) {
+            return;
+          }
           if (!checkBasePhoto.success) {
           if (!checkBasePhoto.success) {
             this.$Message.error(
             this.$Message.error(
               "您上传的底照不符合活体检测的要求,请联系老师!"
               "您上传的底照不符合活体检测的要求,请联系老师!"