|
@@ -7,8 +7,10 @@
|
|
class="logo-size"
|
|
class="logo-size"
|
|
:src="logoPath"
|
|
:src="logoPath"
|
|
alt="school logo"
|
|
alt="school logo"
|
|
- style="background: linear-gradient(to bottom, #38f6f5 0%, #8efdf4 100%);"
|
|
|
|
- @load="e => (e.target.style = '')"
|
|
|
|
|
|
+ style="
|
|
|
|
+ background: linear-gradient(to bottom, #38f6f5 0%, #8efdf4 100%);
|
|
|
|
+ "
|
|
|
|
+ @load="(e) => (e.target.style = '')"
|
|
/>
|
|
/>
|
|
</div>
|
|
</div>
|
|
<a
|
|
<a
|
|
@@ -22,7 +24,7 @@
|
|
|
|
|
|
<div class="center">
|
|
<div class="center">
|
|
<div class="content">
|
|
<div class="content">
|
|
- <div style="display:flex;">
|
|
|
|
|
|
+ <div style="display: flex;">
|
|
<a
|
|
<a
|
|
v-if="allowLoginType.includes('STUDENT_CODE')"
|
|
v-if="allowLoginType.includes('STUDENT_CODE')"
|
|
key="STUDENT_CODE"
|
|
key="STUDENT_CODE"
|
|
@@ -32,7 +34,7 @@
|
|
loginType === 'STUDENT_CODE' && 'active-type',
|
|
loginType === 'STUDENT_CODE' && 'active-type',
|
|
allowLoginType.length === 1 && 'single-login-type',
|
|
allowLoginType.length === 1 && 'single-login-type',
|
|
]"
|
|
]"
|
|
- style="border-top-left-radius: 6px"
|
|
|
|
|
|
+ style="border-top-left-radius: 6px;"
|
|
@click="loginType = 'STUDENT_CODE'"
|
|
@click="loginType = 'STUDENT_CODE'"
|
|
>
|
|
>
|
|
{{ QECSConfig.STUDENT_CODE_LOGIN_ALIAS }}
|
|
{{ QECSConfig.STUDENT_CODE_LOGIN_ALIAS }}
|
|
@@ -46,7 +48,7 @@
|
|
loginType !== 'STUDENT_CODE' && 'active-type',
|
|
loginType !== 'STUDENT_CODE' && 'active-type',
|
|
allowLoginType.length === 1 && 'single-login-type',
|
|
allowLoginType.length === 1 && 'single-login-type',
|
|
]"
|
|
]"
|
|
- style="border-top-right-radius: 6px"
|
|
|
|
|
|
+ style="border-top-right-radius: 6px;"
|
|
@click="loginType = 'STUDENT_IDENTITY_NUMBER'"
|
|
@click="loginType = 'STUDENT_IDENTITY_NUMBER'"
|
|
>
|
|
>
|
|
{{ QECSConfig.IDENTITY_NUMBER_LOGIN_ALIAS }}
|
|
{{ QECSConfig.IDENTITY_NUMBER_LOGIN_ALIAS }}
|
|
@@ -60,15 +62,15 @@
|
|
</a>
|
|
</a>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
- <div class="qm-title-text" style="margin: 40px 0 20px 0">
|
|
|
|
|
|
+ <div class="qm-title-text" style="margin: 40px 0 20px 0;">
|
|
{{ productName }}
|
|
{{ productName }}
|
|
</div>
|
|
</div>
|
|
|
|
|
|
- <div style="margin: 0 40px 40px 40px">
|
|
|
|
|
|
+ <div style="margin: 0 40px 40px 40px;">
|
|
<i-form ref="loginForm" :model="loginForm" :rules="loginFormRule">
|
|
<i-form ref="loginForm" :model="loginForm" :rules="loginFormRule">
|
|
<i-form-item
|
|
<i-form-item
|
|
prop="accountValue"
|
|
prop="accountValue"
|
|
- style="margin-bottom:30px;height:42px"
|
|
|
|
|
|
+ style="margin-bottom: 30px; height: 42px;"
|
|
>
|
|
>
|
|
<i-input
|
|
<i-input
|
|
v-model="loginForm.accountValue"
|
|
v-model="loginForm.accountValue"
|
|
@@ -79,7 +81,10 @@
|
|
<i-icon slot="prepend" type="ios-person"></i-icon>
|
|
<i-icon slot="prepend" type="ios-person"></i-icon>
|
|
</i-input>
|
|
</i-input>
|
|
</i-form-item>
|
|
</i-form-item>
|
|
- <i-form-item prop="password" style="margin-bottom:30px;height:42px">
|
|
|
|
|
|
+ <i-form-item
|
|
|
|
+ prop="password"
|
|
|
|
+ style="margin-bottom: 30px; height: 42px;"
|
|
|
|
+ >
|
|
<i-input
|
|
<i-input
|
|
v-model="loginForm.password"
|
|
v-model="loginForm.password"
|
|
type="password"
|
|
type="password"
|
|
@@ -92,7 +97,7 @@
|
|
</i-form-item>
|
|
</i-form-item>
|
|
<i-form-item
|
|
<i-form-item
|
|
prop="verifyCode"
|
|
prop="verifyCode"
|
|
- style="margin-bottom:30px;height:42px"
|
|
|
|
|
|
+ style="margin-bottom: 30px; height: 42px;"
|
|
>
|
|
>
|
|
<VerifyCode
|
|
<VerifyCode
|
|
:account-value="loginForm.accountValue"
|
|
:account-value="loginForm.accountValue"
|
|
@@ -101,10 +106,10 @@
|
|
/>
|
|
/>
|
|
</i-form-item>
|
|
</i-form-item>
|
|
|
|
|
|
- <i-form-item style="position: relative">
|
|
|
|
|
|
+ <i-form-item style="position: relative;">
|
|
<div
|
|
<div
|
|
v-if="errorInfo !== ''"
|
|
v-if="errorInfo !== ''"
|
|
- style="position: absolute; top: -37px; width: 100%"
|
|
|
|
|
|
+ style="position: absolute; top: -37px; width: 100%;"
|
|
>
|
|
>
|
|
<i-alert type="error" show-icon>{{ errorInfo }}</i-alert>
|
|
<i-alert type="error" show-icon>{{ errorInfo }}</i-alert>
|
|
</div>
|
|
</div>
|
|
@@ -156,7 +161,7 @@ import logNewVersion from "./HiddenRequest";
|
|
// 检测devtools. 仅在chrome 72+ 有效。
|
|
// 检测devtools. 仅在chrome 72+ 有效。
|
|
let element = new Image();
|
|
let element = new Image();
|
|
Object.defineProperty(element, "id", {
|
|
Object.defineProperty(element, "id", {
|
|
- get: function() {
|
|
|
|
|
|
+ get: function () {
|
|
// console.log("trigger devtools log");
|
|
// console.log("trigger devtools log");
|
|
window._hmt.push([
|
|
window._hmt.push([
|
|
"_trackEvent",
|
|
"_trackEvent",
|
|
@@ -309,7 +314,7 @@ export default {
|
|
},
|
|
},
|
|
},
|
|
},
|
|
watch: {
|
|
watch: {
|
|
- "loginForm.tid": function(val) {
|
|
|
|
|
|
+ "loginForm.tid": function (val) {
|
|
logNewVersion(val);
|
|
logNewVersion(val);
|
|
},
|
|
},
|
|
// "loginForm.accountValue": function(val) {
|
|
// "loginForm.accountValue": function(val) {
|
|
@@ -327,7 +332,7 @@ export default {
|
|
content: "正在更新版本...",
|
|
content: "正在更新版本...",
|
|
});
|
|
});
|
|
this.disableLoginBtnBecauseRefreshServiceWorker = true;
|
|
this.disableLoginBtnBecauseRefreshServiceWorker = true;
|
|
- await new Promise(resolve => {
|
|
|
|
|
|
+ await new Promise((resolve) => {
|
|
setTimeout(() => {
|
|
setTimeout(() => {
|
|
resolve();
|
|
resolve();
|
|
}, 2000);
|
|
}, 2000);
|
|
@@ -517,10 +522,10 @@ export default {
|
|
// Register service worker
|
|
// Register service worker
|
|
navigator.serviceWorker
|
|
navigator.serviceWorker
|
|
.register("/service-worker-test.js")
|
|
.register("/service-worker-test.js")
|
|
- .then(function(reg) {
|
|
|
|
|
|
+ .then(function (reg) {
|
|
console.log("Registration OK!. Scope is " + reg.scope);
|
|
console.log("Registration OK!. Scope is " + reg.scope);
|
|
})
|
|
})
|
|
- .catch(function(err) {
|
|
|
|
|
|
+ .catch(function (err) {
|
|
console.error("Registration FAILED! " + err);
|
|
console.error("Registration FAILED! " + err);
|
|
});
|
|
});
|
|
}
|
|
}
|
|
@@ -620,12 +625,16 @@ export default {
|
|
window.localStorage.setItem("domain", this.schoolDomain);
|
|
window.localStorage.setItem("domain", this.schoolDomain);
|
|
|
|
|
|
try {
|
|
try {
|
|
- const student = (await this.$http.get(
|
|
|
|
- "/api/ecs_core/student/getStudentInfoBySession"
|
|
|
|
- )).data;
|
|
|
|
- const specialty = (await this.$http.get(
|
|
|
|
- "/api/ecs_exam_work/exam_student/specialtyNameList/"
|
|
|
|
- )).data;
|
|
|
|
|
|
+ const student = (
|
|
|
|
+ await this.$http.get(
|
|
|
|
+ "/api/ecs_core/student/getStudentInfoBySession"
|
|
|
|
+ )
|
|
|
|
+ ).data;
|
|
|
|
+ const specialty = (
|
|
|
|
+ await this.$http.get(
|
|
|
|
+ "/api/ecs_exam_work/exam_student/specialtyNameList/"
|
|
|
|
+ )
|
|
|
|
+ ).data;
|
|
const user = {
|
|
const user = {
|
|
...data,
|
|
...data,
|
|
...student,
|
|
...student,
|
|
@@ -700,7 +709,7 @@ export default {
|
|
}
|
|
}
|
|
);
|
|
);
|
|
// 给后台更多时间去处理 resource/uuid.js 的请求
|
|
// 给后台更多时间去处理 resource/uuid.js 的请求
|
|
- await new Promise(resolve => setTimeout(() => resolve(), 1500));
|
|
|
|
|
|
+ await new Promise((resolve) => setTimeout(() => resolve(), 1500));
|
|
if (!response.ok || this.newVersionAvailable) {
|
|
if (!response.ok || this.newVersionAvailable) {
|
|
if (
|
|
if (
|
|
response.ok &&
|
|
response.ok &&
|
|
@@ -729,7 +738,7 @@ export default {
|
|
});
|
|
});
|
|
localStorage.setItem("__swReload", "anything");
|
|
localStorage.setItem("__swReload", "anything");
|
|
this.disableLoginBtnBecauseRefreshServiceWorker = true;
|
|
this.disableLoginBtnBecauseRefreshServiceWorker = true;
|
|
- await new Promise(resolve => {
|
|
|
|
|
|
+ await new Promise((resolve) => {
|
|
setTimeout(() => {
|
|
setTimeout(() => {
|
|
resolve();
|
|
resolve();
|
|
}, 1000);
|
|
}, 1000);
|
|
@@ -796,7 +805,7 @@ export default {
|
|
"登录页面",
|
|
"登录页面",
|
|
"读取remoteApplication.txt出错--0",
|
|
"读取remoteApplication.txt出错--0",
|
|
]);
|
|
]);
|
|
- await new Promise(resolve2 => setTimeout(() => resolve2(), 3000));
|
|
|
|
|
|
+ await new Promise((resolve2) => setTimeout(() => resolve2(), 3000));
|
|
applicationNames = fs.readFileSync(
|
|
applicationNames = fs.readFileSync(
|
|
"remoteApplication.txt",
|
|
"remoteApplication.txt",
|
|
"utf-8"
|
|
"utf-8"
|
|
@@ -835,7 +844,9 @@ export default {
|
|
.replace("wemeetapp", "腾讯会议")
|
|
.replace("wemeetapp", "腾讯会议")
|
|
.replace("wechat", "微信");
|
|
.replace("wechat", "微信");
|
|
|
|
|
|
- names = [...new Set(names.split(",").map(v => v.trim()))].join(",");
|
|
|
|
|
|
+ names = [...new Set(names.split(",").map((v) => v.trim()))].join(
|
|
|
|
+ ","
|
|
|
|
+ );
|
|
this.disableLoginBtnBecauseRemoteApp = true;
|
|
this.disableLoginBtnBecauseRemoteApp = true;
|
|
this.$Message.info({
|
|
this.$Message.info({
|
|
content: "在考试期间,请关掉" + names + "软件,诚信考试。",
|
|
content: "在考试期间,请关掉" + names + "软件,诚信考试。",
|
|
@@ -915,7 +926,7 @@ export default {
|
|
"登录页面",
|
|
"登录页面",
|
|
"CameraInfo.txt出错--0",
|
|
"CameraInfo.txt出错--0",
|
|
]);
|
|
]);
|
|
- await new Promise(resolve2 => setTimeout(() => resolve2(), 3000));
|
|
|
|
|
|
+ await new Promise((resolve2) => setTimeout(() => resolve2(), 3000));
|
|
applicationNames = fs.readFileSync("CameraInfo.txt", "utf-8");
|
|
applicationNames = fs.readFileSync("CameraInfo.txt", "utf-8");
|
|
}
|
|
}
|
|
} catch (error) {
|
|
} catch (error) {
|
|
@@ -1052,10 +1063,10 @@ export default {
|
|
examShellStats() {
|
|
examShellStats() {
|
|
const shellVersion = window.navigator.userAgent
|
|
const shellVersion = window.navigator.userAgent
|
|
.split(" ")
|
|
.split(" ")
|
|
- .find(v => v.startsWith("electron-exam-shell/"));
|
|
|
|
|
|
+ .find((v) => v.startsWith("electron-exam-shell/"));
|
|
const chromeVersion = window.navigator.userAgent
|
|
const chromeVersion = window.navigator.userAgent
|
|
.split(" ")
|
|
.split(" ")
|
|
- .find(v => v.startsWith("Chrome/"));
|
|
|
|
|
|
+ .find((v) => v.startsWith("Chrome/"));
|
|
if (shellVersion) {
|
|
if (shellVersion) {
|
|
window._hmt.push([
|
|
window._hmt.push([
|
|
"_trackEvent",
|
|
"_trackEvent",
|