|
@@ -127,6 +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, { chromeUA } from "@/utils/ua.js";
|
|
|
|
|
|
// 检测devtools. 仅在chrome 72+ 有效。
|
|
|
let element = new Image();
|
|
@@ -189,7 +190,7 @@ export default {
|
|
|
isElectron: true,
|
|
|
disableLoginBtnBecauseRemoteApp: true,
|
|
|
disableLoginBtnBecauseVCam: true,
|
|
|
- disableLoginBtnBecauseNoRemoteAppChecker: false,
|
|
|
+ disableLoginBtnBecauseAppVersionChecker: false,
|
|
|
disableLoginBtnBecauseRefreshServiceWorker: false,
|
|
|
newVersionAvailable: false,
|
|
|
VUE_APP_GIT_REPO_VERSION: process.env.VUE_APP_GIT_REPO_VERSION,
|
|
@@ -243,13 +244,13 @@ export default {
|
|
|
// this.isElectron,
|
|
|
// this.disableLoginBtnBecauseRemoteApp,
|
|
|
// this.disableLoginBtnBecauseVCam,
|
|
|
- // this.disableLoginBtnBecauseNoRemoteAppChecker
|
|
|
+ // this.disableLoginBtnBecauseAppVersionChecker
|
|
|
// );
|
|
|
return (
|
|
|
(this.isElectron &&
|
|
|
(this.disableLoginBtnBecauseRemoteApp ||
|
|
|
- this.disableLoginBtnBecauseVCam ||
|
|
|
- this.disableLoginBtnBecauseNoRemoteAppChecker)) ||
|
|
|
+ this.disableLoginBtnBecauseVCam)) ||
|
|
|
+ this.disableLoginBtnBecauseAppVersionChecker ||
|
|
|
this.disableLoginBtnBecauseRefreshServiceWorker
|
|
|
);
|
|
|
},
|
|
@@ -355,17 +356,34 @@ export default {
|
|
|
"xjtu.ecs.qmth.com.cn",
|
|
|
"ccnu.ecs.qmth.com.cn",
|
|
|
"snnu.ecs.qmth.com.cn",
|
|
|
- "cup.ecs.qmth.com.cn",
|
|
|
"swjtu.ecs.qmth.com.cn",
|
|
|
- "cugr.ecs.qmth.com.cn",
|
|
|
- "sdu.ecs.qmth.com.cn",
|
|
|
].includes(this.$route.params.domain)
|
|
|
) {
|
|
|
if (
|
|
|
typeof nodeRequire == "undefined" ||
|
|
|
!window.nodeRequire("fs").existsSync("multiCamera.exe")
|
|
|
) {
|
|
|
- this.disableLoginBtnBecauseNoRemoteAppChecker = true;
|
|
|
+ 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)
|
|
|
+ ) {
|
|
|
+ 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,
|