瀏覽代碼

心跳退出登录时,考虑epcc的情况

Michael Wang 5 年之前
父節點
當前提交
e7fbba8806
共有 1 個文件被更改,包括 10 次插入5 次删除
  1. 10 5
      src/features/OnlineExam/Examing/RemainTime.vue

+ 10 - 5
src/features/OnlineExam/Examing/RemainTime.vue

@@ -104,15 +104,20 @@ export default {
             "心跳",
             "失败10次-退出",
           ]);
+          const redirectUrl = sessionStorage.getItem("redirectUrl");
           this.$Modal.error({
             title: "网络连接异常",
             content: "退出考试",
             onOk: () => {
-              this.$router.push(
-                "/login/" +
-                  localStorage.getItem("domain") +
-                  "?LogoutReason=心跳失败10次-退出"
-              );
+              if (redirectUrl) {
+                window.location = redirectUrl;
+              } else {
+                this.$router.push(
+                  "/login/" +
+                    localStorage.getItem("domain") +
+                    "?LogoutReason=心跳失败10次-退出"
+                );
+              }
             },
           });
           return;