Procházet zdrojové kódy

石油大学放松版本限制

Michael Wang před 5 roky
rodič
revize
5576eb3ed4
1 změnil soubory, kde provedl 18 přidání a 5 odebrání
  1. 18 5
      src/features/Login/Login.vue

+ 18 - 5
src/features/Login/Login.vue

@@ -379,12 +379,25 @@ export default {
       }
     }
 
+    if (["cup.ecs.qmth.com.cn"].includes(this.$route.params.domain)) {
+      // console.log(UA.getBrowser(), chromeUA);
+      if (
+        UA.getBrowser().name !== "electron-exam-shell" ||
+        (UA.getBrowser().major !== "2" && UA.getBrowser().major !== "1") ||
+        chromeUA.major < "58"
+      ) {
+        this.disableLoginBtnBecauseAppVersionChecker = true;
+        this.$Message.error({
+          content: "请与学校申请最新的客户端,进行考试!",
+          duration: 2 * 24 * 60 * 60,
+        });
+      }
+    }
+
     if (
-      [
-        "cup.ecs.qmth.com.cn",
-        "cugr.ecs.qmth.com.cn",
-        "sdu.ecs.qmth.com.cn",
-      ].includes(this.$route.params.domain)
+      ["cugr.ecs.qmth.com.cn", "sdu.ecs.qmth.com.cn"].includes(
+        this.$route.params.domain
+      )
     ) {
       // console.log(UA.getBrowser(), chromeUA);
       if (