浏览代码

活体检测60秒后,无消息返回,则退出登录

Michael Wang 6 年之前
父节点
当前提交
7a5f5b545e
共有 2 个文件被更改,包括 12 次插入7 次删除
  1. 1 1
      src/features/OnlineExam/Examing/ExamingHome.vue
  2. 11 6
      src/features/OnlineExam/Examing/FaceId.vue

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

@@ -18,7 +18,7 @@
         <FaceRecognition v-if="faceEnable" width="100%" height="100%" :showRecognizeButton="false" />
       </div>
     </div>
-    <Modal v-model="showFaceId" :mask-closable="false" :closable="false" width=700 :styles="{top: '20px'}">
+    <Modal v-model="showFaceId" :mask-closable="false" :closable="false" width=800 :styles="{top: '20px'}">
       <FaceId v-if="showFaceId" @closeFaceId="closeFaceId" />
       <p slot="footer">
       </p>

+ 11 - 6
src/features/OnlineExam/Examing/FaceId.vue

@@ -100,7 +100,12 @@ export default {
       var timeInterval = setInterval(() => {
         --this.timeCount;
         if (this.timeCount === 0) {
+          this.$Message.error({
+            content: "人脸检测超时,系统退出,请重新登录",
+            duration: 15
+          });
           clearInterval(timeInterval);
+          this.logout();
         }
       }, 1000);
 
@@ -147,25 +152,25 @@ export default {
         if (receivedMsg.verifyCount == 1) {
           if (receivedMsg.verifyResult == "TIME_OUT") {
             this.$Message.error({
-              content: "第一次人脸检测超时,检测失败,系统退出,请重新登录",
+              content: "第一次人脸检测超时,检测失败,系统退出,请重新登录",
               duration: 15
             });
             this.logout();
           } else if (receivedMsg.verifyResult == "VERIFY_FAILED") {
             this.$Message.error({
-              content: "第一次人脸检测失败,系统退出,请重新登录",
+              content: "第一次人脸检测失败,系统退出,请重新登录",
               duration: 15
             });
             this.logout();
           } else if (receivedMsg.verifyResult == "NOT_ONESELF") {
             this.$Message.error({
-              content: "人脸检测不合格,结束考试",
+              content: "人脸检测不合格结束考试",
               duration: 15
             });
             this.faceTestEndHandle("FAILED");
           } else if (receivedMsg.verifyResult == "VERIFY_SUCCESS") {
             this.$Message.info({
-              content: "人脸检测成功,请继续完成考试",
+              content: "人脸检测成功请继续完成考试",
               duration: 15
             });
             this.faceTestEndHandle("SUCCESS");
@@ -174,13 +179,13 @@ export default {
           if (receivedMsg.verifyResult == "VERIFY_SUCCESS") {
             // FIXME: 什么逻辑?
             this.$Message.info({
-              content: "人脸检测成功,请继续完成考试",
+              content: "人脸检测成功请继续完成考试",
               duration: 15
             });
             this.faceTestEndHandle("SUCCESS");
           } else {
             this.$Message.error({
-              content: "人脸检测不合格,结束考试",
+              content: "人脸检测不合格结束考试",
               duration: 15
             });
             this.faceTestEndHandle("FAILED");