Răsfoiți Sursa

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

Michael Wang 5 ani în urmă
părinte
comite
e7fbba8806
1 a modificat fișierele cu 10 adăugiri și 5 ștergeri
  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;