소스 검색

心跳退出登录时,考虑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;