|
@@ -111,6 +111,7 @@ export default {
|
|
try {
|
|
try {
|
|
const examRecordDataId = this.$route.params.examRecordDataId;
|
|
const examRecordDataId = this.$route.params.examRecordDataId;
|
|
const captureBlob = await this.getSnapShot();
|
|
const captureBlob = await this.getSnapShot();
|
|
|
|
+ this.videoStartPlay();
|
|
// console.log(captureBlob.size);
|
|
// console.log(captureBlob.size);
|
|
this.serverLog("debug/S-004001", "抓拍照片的大小:" + captureBlob.size);
|
|
this.serverLog("debug/S-004001", "抓拍照片的大小:" + captureBlob.size);
|
|
const captureFilePath = await this.uploadToServer(captureBlob);
|
|
const captureFilePath = await this.uploadToServer(captureBlob);
|
|
@@ -119,11 +120,14 @@ export default {
|
|
// FIXME: more processing
|
|
// FIXME: more processing
|
|
console.log("定时抓拍流程失败");
|
|
console.log("定时抓拍流程失败");
|
|
} finally {
|
|
} finally {
|
|
- const video = this.$refs.video;
|
|
|
|
- video && video.play();
|
|
|
|
|
|
+ this.videoStartPlay();
|
|
this.decreaseSnapCount();
|
|
this.decreaseSnapCount();
|
|
}
|
|
}
|
|
},
|
|
},
|
|
|
|
+ videoStartPlay() {
|
|
|
|
+ const video = this.$refs.video;
|
|
|
|
+ video && video.play();
|
|
|
|
+ },
|
|
async snap() {
|
|
async snap() {
|
|
// TODO: chrome 70. FaceDetector检测人脸
|
|
// TODO: chrome 70. FaceDetector检测人脸
|
|
// var canvas = document.createElement("canvas");
|
|
// var canvas = document.createElement("canvas");
|
|
@@ -151,6 +155,7 @@ export default {
|
|
// if(this.disableSnap) return; // 避免界面没有更新。
|
|
// if(this.disableSnap) return; // 避免界面没有更新。
|
|
this.msg = "拍照中...";
|
|
this.msg = "拍照中...";
|
|
const captureBlob = await this.getSnapShot();
|
|
const captureBlob = await this.getSnapShot();
|
|
|
|
+ this.videoStartPlay();
|
|
this.msg = "上传照片中...";
|
|
this.msg = "上传照片中...";
|
|
const captureFilePath = await this.uploadToServer(captureBlob);
|
|
const captureFilePath = await this.uploadToServer(captureBlob);
|
|
this.msg = "人脸比对中...";
|
|
this.msg = "人脸比对中...";
|
|
@@ -160,8 +165,7 @@ export default {
|
|
console.log("同步照片比对流程失败");
|
|
console.log("同步照片比对流程失败");
|
|
throw error;
|
|
throw error;
|
|
} finally {
|
|
} finally {
|
|
- const video = this.$refs.video;
|
|
|
|
- video && video.play();
|
|
|
|
|
|
+ this.videoStartPlay();
|
|
this.msg = "开始识别";
|
|
this.msg = "开始识别";
|
|
this.disableSnap = false;
|
|
this.disableSnap = false;
|
|
}
|
|
}
|