|
@@ -16,9 +16,8 @@ export default {
|
|
|
},
|
|
|
async mounted() {
|
|
|
this.heartbeatErrorNum = 0;
|
|
|
- this.getRemainTimeFromServer();
|
|
|
this.first = true;
|
|
|
- this.remainTime += 60 * 1000; //补偿心跳
|
|
|
+ this.getRemainTimeFromServer();
|
|
|
this.intervalA = setInterval(() => {
|
|
|
if (this.first) {
|
|
|
// 跳过第一次
|
|
@@ -44,6 +43,9 @@ export default {
|
|
|
"/api/ecs_oe_student/examControl/examHeartbeat"
|
|
|
);
|
|
|
this.remainTime = res.data;
|
|
|
+ if (this.first) {
|
|
|
+ this.remainTime += 60 * 1000; //补偿心跳
|
|
|
+ }
|
|
|
this.heartbeatErrorNum = 0;
|
|
|
} catch (e) {
|
|
|
this.heartbeatErrorNum++;
|