浏览代码

再次获取活检时间接口:失败则退出

Michael Wang 5 年之前
父节点
当前提交
70342bc103
共有 1 个文件被更改,包括 15 次插入2 次删除
  1. 15 2
      src/features/OnlineExam/Examing/ExamingHome.vue

+ 15 - 2
src/features/OnlineExam/Examing/ExamingHome.vue

@@ -645,13 +645,26 @@ export default {
     closeFaceId() {
       this.showFaceId = false;
     },
-    closeFaceMotion(faceLiveResult) {
+    async closeFaceMotion(faceLiveResult) {
       this.showFaceMotion = false;
       console.log(faceLiveResult);
       if (faceLiveResult.endExam) {
         this.logout("?LogoutReason=活检后台交卷");
       } else if (faceLiveResult.needNextVerify) {
-        this.initFaceLiveness();
+        const initFaceLivenessResult = await this.initFaceLiveness();
+        if (initFaceLivenessResult === false) {
+          window._hmt.push([
+            "_trackEvent",
+            "正在考试页面",
+            "活检接口再次获取失败-退出",
+          ]);
+          this.$Message.error({
+            content: "获取考试和试卷信息失败,退出登录",
+            duration: 15,
+            closable: true,
+          });
+          this.logout("?LogoutReason=活检接口再次获取失败-退出");
+        }
       }
     },
     async answerAllQuestions(ignoreDirty) {