|
@@ -36,7 +36,7 @@ export default {
|
|
|
clearInterval(this.intervalB);
|
|
|
},
|
|
|
methods: {
|
|
|
- ...mapMutations(["shouldSumbitPaper"]),
|
|
|
+ ...mapMutations(["setShouldSubmitPaper"]),
|
|
|
async getRemainTimeFromServer() {
|
|
|
const res = await this.$http.get(
|
|
|
"/api/ecs_oe_student/examControl/examHeartbeat"
|
|
@@ -50,9 +50,9 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
watch: {
|
|
|
- remainTime(val, oldVal) {
|
|
|
- if (oldVal && val === 0) {
|
|
|
- this.shouldSumbitPaper();
|
|
|
+ remainTime(val) {
|
|
|
+ if (val < 0) {
|
|
|
+ this.setShouldSubmitPaper();
|
|
|
}
|
|
|
}
|
|
|
}
|