|
@@ -76,6 +76,7 @@ export default {
|
|
|
const [fileName, captureFilePath] = await this.uploadToServer(
|
|
|
captureBlob
|
|
|
);
|
|
|
+
|
|
|
await this.faceCompare(fileName, captureFilePath);
|
|
|
const video = this.$refs.video;
|
|
|
video && video.play();
|
|
@@ -86,9 +87,7 @@ export default {
|
|
|
this.msg = "上传照片中...";
|
|
|
const [, captureFilePath] = await this.uploadToServer(captureBlob);
|
|
|
this.msg = "人脸比对中...";
|
|
|
- const UPYUN_URL = (await this.$http.get("/api/ecs_oe_student_face/upyun"))
|
|
|
- .data.downloadPrefix;
|
|
|
- await this.faceCompareSync(UPYUN_URL + captureFilePath);
|
|
|
+ await this.faceCompareSync(captureFilePath);
|
|
|
const video = this.$refs.video;
|
|
|
video && video.play();
|
|
|
},
|
|
@@ -122,7 +121,13 @@ export default {
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
- return [fileName, "/capture_photo/" + this.user.userId + "/" + fileName];
|
|
|
+ const UPYUN_URL = (await this.$http.get("/api/ecs_oe_student_face/upyun"))
|
|
|
+ .data.downloadPrefix;
|
|
|
+
|
|
|
+ return [
|
|
|
+ fileName,
|
|
|
+ UPYUN_URL + "/capture_photo/" + this.user.userId + "/" + fileName
|
|
|
+ ];
|
|
|
},
|
|
|
async faceCompareSync(captureFilePath) {
|
|
|
try {
|
|
@@ -147,7 +152,6 @@ export default {
|
|
|
try {
|
|
|
await this.$http.post(
|
|
|
"/api/ecs_oe_student_face/examCaptureQueue/uploadExamCapture?fileUrl=" +
|
|
|
- UPYUN_URL +
|
|
|
captureFilePath +
|
|
|
"&fileName=" +
|
|
|
fileName +
|