|
@@ -127,7 +127,7 @@ import { FACE_API_MODEL_PATH } from "@/constants/constants";
|
|
|
import DevTools from "./DevTools.vue";
|
|
|
import nativeExe from "@/utils/nativeExe";
|
|
|
import { EPCC_DOMAIN } from "@/constants/constants";
|
|
|
-import UA, { isGreatThanEqual200 } from "@/utils/ua.js";
|
|
|
+import UA, { chromeUA } from "@/utils/ua.js";
|
|
|
|
|
|
// 检测devtools. 仅在chrome 72+ 有效。
|
|
|
let element = new Image();
|
|
@@ -351,28 +351,48 @@ export default {
|
|
|
process.env.NODE_ENV === "production" ? "" : "180613";
|
|
|
}
|
|
|
|
|
|
- // if (
|
|
|
- // [
|
|
|
- // "xjtu.ecs.qmth.com.cn",
|
|
|
- // "ccnu.ecs.qmth.com.cn",
|
|
|
- // "snnu.ecs.qmth.com.cn",
|
|
|
- // "swjtu.ecs.qmth.com.cn",
|
|
|
- // ].includes(this.$route.params.domain)
|
|
|
- // ) {
|
|
|
- // if (
|
|
|
- // typeof nodeRequire == "undefined" ||
|
|
|
- // !window.nodeRequire("fs").existsSync("multiCamera.exe")
|
|
|
- // ) {
|
|
|
- // this.disableLoginBtnBecauseAppVersionChecker = true;
|
|
|
- // this.$Message.error({
|
|
|
- // content: "请与学校申请最新的客户端,进行考试!",
|
|
|
- // duration: 2 * 24 * 60 * 60,
|
|
|
- // });
|
|
|
- // }
|
|
|
- // }
|
|
|
+ if (
|
|
|
+ [
|
|
|
+ "xjtu.ecs.qmth.com.cn",
|
|
|
+ "ccnu.ecs.qmth.com.cn",
|
|
|
+ "snnu.ecs.qmth.com.cn",
|
|
|
+ "swjtu.ecs.qmth.com.cn",
|
|
|
+ ].includes(this.$route.params.domain)
|
|
|
+ ) {
|
|
|
+ if (
|
|
|
+ typeof nodeRequire == "undefined" ||
|
|
|
+ !window.nodeRequire("fs").existsSync("multiCamera.exe")
|
|
|
+ ) {
|
|
|
+ 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)
|
|
|
+ ) {
|
|
|
+ // console.log(UA.getBrowser(), chromeUA);
|
|
|
+ if (
|
|
|
+ UA.getBrowser().name !== "electron-exam-shell" ||
|
|
|
+ UA.getBrowser().major !== "2" ||
|
|
|
+ chromeUA.major < "76"
|
|
|
+ ) {
|
|
|
+ this.disableLoginBtnBecauseAppVersionChecker = true;
|
|
|
+ this.$Message.error({
|
|
|
+ content: "请与学校申请最新的客户端,进行考试!",
|
|
|
+ duration: 2 * 24 * 60 * 60,
|
|
|
+ });
|
|
|
+ }
|
|
|
+ }
|
|
|
|
|
|
await this.checkElectronConfig();
|
|
|
- await this.checkAppVersion();
|
|
|
await this.checkVCam();
|
|
|
|
|
|
if (
|
|
@@ -737,32 +757,6 @@ export default {
|
|
|
this.disableLoginBtnBecauseVCam = false;
|
|
|
}
|
|
|
},
|
|
|
- async checkAppVersion() {
|
|
|
- // console.log(UA.getBrowser(), chromeUA);
|
|
|
- const allowVer = this.QECSConfig.STUDENT_CLIENT_VERSION.split(",");
|
|
|
- if (allowVer.includes("1.0.0")) {
|
|
|
- // 包含 1.0.0 时所有都能进,包括浏览器
|
|
|
- this.disableLoginBtnBecauseAppVersionChecker = false;
|
|
|
- } else if (isGreatThanEqual200) {
|
|
|
- // 判断是否为大于等于 2.0.0 的客户端
|
|
|
- if (allowVer.includes(UA.getBrowser().version)) {
|
|
|
- this.disableLoginBtnBecauseAppVersionChecker = false;
|
|
|
- } else {
|
|
|
- this.disableLoginBtnBecauseAppVersionChecker = true;
|
|
|
- this.$Message.error({
|
|
|
- content: "请与学校申请最新的客户端,进行考试!",
|
|
|
- duration: 2 * 24 * 60 * 60,
|
|
|
- });
|
|
|
- }
|
|
|
- } else {
|
|
|
- // 此处表示当不选择1.0.0时,所有非2.0.0单独exe的包都不能进
|
|
|
- this.disableLoginBtnBecauseAppVersionChecker = true;
|
|
|
- this.$Message.error({
|
|
|
- content: "请与学校申请最新的客户端,进行考试!",
|
|
|
- duration: 2 * 24 * 60 * 60,
|
|
|
- });
|
|
|
- }
|
|
|
- },
|
|
|
closeApp() {
|
|
|
window.close();
|
|
|
},
|