|
@@ -2,6 +2,7 @@
|
|
|
import { onlineExamDataApi } from "@/api/onlinePractice";
|
|
|
import { httpApp } from "@/plugins/axiosApp";
|
|
|
import router from "@/router";
|
|
|
+import { useUnmounted } from "@/setups/useUnmouted";
|
|
|
import { store } from "@/store/store";
|
|
|
import { Store } from "@/types/student-client";
|
|
|
import { onMounted, onUnmounted } from "vue";
|
|
@@ -11,6 +12,8 @@ const route = useRoute();
|
|
|
const examId = +route.params.examId;
|
|
|
const examRecordDataId = +route.params.examRecordDataId;
|
|
|
|
|
|
+const { isUnmounted } = useUnmounted();
|
|
|
+
|
|
|
let loading = $ref(true);
|
|
|
let afterExamRemark = $ref("");
|
|
|
let cheatingRemark = $ref("");
|
|
@@ -69,6 +72,9 @@ async function getExamResult() {
|
|
|
try {
|
|
|
const startTime = Date.now();
|
|
|
for (let i = 0; i < 20; i++) {
|
|
|
+ if (isUnmounted) {
|
|
|
+ return;
|
|
|
+ }
|
|
|
examResult = (
|
|
|
await httpApp.get(
|
|
|
"/api/ecs_oe_student/examControl/getEndExamInfo?examRecordDataId=" +
|