|
@@ -320,7 +320,18 @@ export default {
|
|
"登录",
|
|
"登录",
|
|
this.$route.query.LogoutReason,
|
|
this.$route.query.LogoutReason,
|
|
]);
|
|
]);
|
|
- await this.checkExamInProgress();
|
|
|
|
|
|
+ const alreadyInExam = await this.checkExamInProgress();
|
|
|
|
+ if (alreadyInExam) {
|
|
|
|
+ window._hmt.push([
|
|
|
|
+ "_trackEvent",
|
|
|
|
+ "登录页面",
|
|
|
|
+ "断点续考",
|
|
|
|
+ "重新登录",
|
|
|
|
+ ]);
|
|
|
|
+ this.logout("?LogoutReason=登录页面获取断点续考信息异常");
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
|
|
+ this.$router.push("/online-exam");
|
|
window._hmt.push(["_trackEvent", "登录页面", "登录成功"]);
|
|
window._hmt.push(["_trackEvent", "登录页面", "登录成功"]);
|
|
} catch (error) {
|
|
} catch (error) {
|
|
window._hmt.push([
|
|
window._hmt.push([
|
|
@@ -340,79 +351,6 @@ export default {
|
|
this.errorInfo = data.desc;
|
|
this.errorInfo = data.desc;
|
|
}
|
|
}
|
|
},
|
|
},
|
|
- async checkExamInProgress() {
|
|
|
|
- try {
|
|
|
|
- // 断点续考
|
|
|
|
- const examingRes = (await this.$http.get(
|
|
|
|
- "/api/ecs_oe_student/examControl/checkExamInProgress"
|
|
|
|
- )).data;
|
|
|
|
- if (examingRes.isExceed) {
|
|
|
|
- // 超出断点续考次数的逻辑,仅此block
|
|
|
|
- this.$Message.info({
|
|
|
|
- content: `超出最大断点续考次数(${
|
|
|
|
- examingRes.maxInterruptNum
|
|
|
|
- }),正在自动交卷...`,
|
|
|
|
- duration: 15,
|
|
|
|
- closable: true,
|
|
|
|
- });
|
|
|
|
- this.$Spin.show({
|
|
|
|
- render: () => {
|
|
|
|
- return (
|
|
|
|
- <div style="font-size: 24px">
|
|
|
|
- 超出最大断点续考次数({examingRes.maxInterruptNum}
|
|
|
|
- ),正在自动交卷...
|
|
|
|
- </div>
|
|
|
|
- );
|
|
|
|
- },
|
|
|
|
- });
|
|
|
|
- const res = await this.$http.get(
|
|
|
|
- "/api/ecs_oe_student/examControl/endExam"
|
|
|
|
- );
|
|
|
|
- if (res.status === 200) {
|
|
|
|
- this.$router.replace({
|
|
|
|
- path: `/online-exam/exam/${examingRes.examId}/examRecordData/${
|
|
|
|
- examingRes.examRecordDataId
|
|
|
|
- }/end`,
|
|
|
|
- });
|
|
|
|
- this.$Spin.hide();
|
|
|
|
- } else {
|
|
|
|
- this.$Message.error({
|
|
|
|
- content: "交卷失败",
|
|
|
|
- duration: 15,
|
|
|
|
- closable: true,
|
|
|
|
- });
|
|
|
|
- }
|
|
|
|
- return;
|
|
|
|
- }
|
|
|
|
- if (examingRes) {
|
|
|
|
- this.$Spin.show({
|
|
|
|
- render: () => {
|
|
|
|
- return <div style="font-size: 24px">正在进入断点续考...</div>;
|
|
|
|
- },
|
|
|
|
- });
|
|
|
|
- window._hmt.push(["_trackEvent", "登录页面", "断点续考", "重新登录"]);
|
|
|
|
- this.$router.push(
|
|
|
|
- `/online-exam/exam/${examingRes.examId}/examRecordData/${
|
|
|
|
- examingRes.examRecordDataId
|
|
|
|
- }/order/1` +
|
|
|
|
- (examingRes.faceVerifyMinute
|
|
|
|
- ? `?faceVerifyMinute=${examingRes.faceVerifyMinute}`
|
|
|
|
- : "")
|
|
|
|
- );
|
|
|
|
- setTimeout(() => this.$Spin.hide(), 1000);
|
|
|
|
- return;
|
|
|
|
- }
|
|
|
|
- this.$router.push("/online-exam");
|
|
|
|
- } catch (error) {
|
|
|
|
- this.$Message.error({
|
|
|
|
- content: "获取断点续考信息异常,退出登录",
|
|
|
|
- duration: 15,
|
|
|
|
- closable: true,
|
|
|
|
- });
|
|
|
|
- this.logout("?LogoutReason=登录页面获取断点续考信息异常");
|
|
|
|
- return;
|
|
|
|
- }
|
|
|
|
- },
|
|
|
|
async checkNewVersion() {
|
|
async checkNewVersion() {
|
|
let myHeaders = new Headers();
|
|
let myHeaders = new Headers();
|
|
myHeaders.append("Content-Type", "application/javascript");
|
|
myHeaders.append("Content-Type", "application/javascript");
|