|
@@ -168,6 +168,24 @@ export default {
|
|
process.env.NODE_ENV === "production" ? "" : "180613";
|
|
process.env.NODE_ENV === "production" ? "" : "180613";
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ if (
|
|
|
|
+ this.$route.path.includes("xjtu.ecs.qmth.com.cn") ||
|
|
|
|
+ this.$route.path.includes("snnu.ecs.qmth.com.cn")
|
|
|
|
+ ) {
|
|
|
|
+ this.disableLoginBtn = true;
|
|
|
|
+ if (
|
|
|
|
+ typeof nodeRequire == "undefined" ||
|
|
|
|
+ !window.nodeRequire("fs").existsSync("multiCamera.exe")
|
|
|
|
+ ) {
|
|
|
|
+ this.$Message.error({
|
|
|
|
+ content: "请与学校申请最新的客户端,进行考试!",
|
|
|
|
+ duration: 2 * 24 * 60 * 60
|
|
|
|
+ });
|
|
|
|
+
|
|
|
|
+ return; // 避免 disableLoginBtn 被覆盖
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
if (typeof nodeRequire != "undefined") {
|
|
if (typeof nodeRequire != "undefined") {
|
|
var that = this;
|
|
var that = this;
|
|
var fs = window.nodeRequire("fs");
|
|
var fs = window.nodeRequire("fs");
|
|
@@ -219,21 +237,6 @@ export default {
|
|
} else {
|
|
} else {
|
|
this.disableLoginBtn = false;
|
|
this.disableLoginBtn = false;
|
|
}
|
|
}
|
|
-
|
|
|
|
- if (
|
|
|
|
- this.$route.path.includes("xjtu.ecs.qmth.com.cn") ||
|
|
|
|
- this.$route.path.includes("snnu.ecs.qmth.com.cn")
|
|
|
|
- ) {
|
|
|
|
- this.disableLoginBtn = true;
|
|
|
|
- let fs = window.nodeRequire("fs");
|
|
|
|
- if (!fs.existsSync("multiCamera.exe")) {
|
|
|
|
- this.disableLoginBtn = false;
|
|
|
|
- this.$Message.error({
|
|
|
|
- content: "请使用最新版本的客户端进行考试!",
|
|
|
|
- duration: 2 * 24 * 60 * 60
|
|
|
|
- });
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
...mapMutations(["updateUser", "updateTimeDifference"]),
|
|
...mapMutations(["updateUser", "updateTimeDifference"]),
|