|
@@ -76,11 +76,12 @@ export default {
|
|
}
|
|
}
|
|
},
|
|
},
|
|
async snapTimer() {
|
|
async snapTimer() {
|
|
|
|
+ const examRecordDataId = this.$route.params.examRecordDataId;
|
|
const captureBlob = await this.getSnapShot();
|
|
const captureBlob = await this.getSnapShot();
|
|
const [fileName, captureFilePath] = await this.uploadToServer(
|
|
const [fileName, captureFilePath] = await this.uploadToServer(
|
|
captureBlob
|
|
captureBlob
|
|
);
|
|
);
|
|
- await this.faceCompare(fileName, captureFilePath);
|
|
|
|
|
|
+ await this.faceCompare(fileName, captureFilePath, examRecordDataId);
|
|
this.decreaseSnapCount();
|
|
this.decreaseSnapCount();
|
|
const video = this.$refs.video;
|
|
const video = this.$refs.video;
|
|
video && video.play();
|
|
video && video.play();
|
|
@@ -166,7 +167,7 @@ export default {
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
},
|
|
},
|
|
- async faceCompare(fileName, captureFilePath) {
|
|
|
|
|
|
+ async faceCompare(fileName, captureFilePath, examRecordDataId) {
|
|
try {
|
|
try {
|
|
await this.$http.post(
|
|
await this.$http.post(
|
|
"/api/ecs_oe_student_face/examCaptureQueue/uploadExamCapture?fileUrl=" +
|
|
"/api/ecs_oe_student_face/examCaptureQueue/uploadExamCapture?fileUrl=" +
|
|
@@ -174,9 +175,8 @@ export default {
|
|
"&fileName=" +
|
|
"&fileName=" +
|
|
fileName +
|
|
fileName +
|
|
"&examRecordDataId=" +
|
|
"&examRecordDataId=" +
|
|
- this.$route.params.examRecordDataId
|
|
|
|
|
|
+ examRecordDataId
|
|
);
|
|
);
|
|
- const examRecordDataId = this.$route.params.examRecordDataId;
|
|
|
|
await this.showSnapResult(fileName, examRecordDataId);
|
|
await this.showSnapResult(fileName, examRecordDataId);
|
|
} catch (e) {
|
|
} catch (e) {
|
|
console.log(e);
|
|
console.log(e);
|