|
@@ -444,6 +444,11 @@ export default {
|
|
|
this.msg = "人脸比对中...";
|
|
|
console.log(this.msg);
|
|
|
await this.faceCompareSync(captureFilePath, signIdentifier);
|
|
|
+ this.logger({
|
|
|
+ action: "同步比对照片详细日志",
|
|
|
+ fileUrl: captureFilePath,
|
|
|
+ signIdentifier,
|
|
|
+ });
|
|
|
console.log("人脸比对成功");
|
|
|
} catch (error) {
|
|
|
console.log("同步照片比对流程失败");
|
|
@@ -517,6 +522,13 @@ export default {
|
|
|
const fileMd5Base64 = window.btoa(
|
|
|
String.fromCharCode(...MD5.digest(buffer))
|
|
|
);
|
|
|
+ if (fileMd5Base64 === this.__previousFileMD5Base64) {
|
|
|
+ this.logger({
|
|
|
+ page: "摄像头框",
|
|
|
+ detail: "抓拍照片异常",
|
|
|
+ error: "两次fileMd5Base64一样,疑似摄像头卡住",
|
|
|
+ });
|
|
|
+ }
|
|
|
// console.log(fileMd5);
|
|
|
// console.log(fileMd5, fileMd5Base64);
|
|
|
|
|
@@ -570,6 +582,7 @@ export default {
|
|
|
]);
|
|
|
throw new Error("图片校验失败");
|
|
|
}
|
|
|
+ this.__previousFileMD5Base64 = fileMd5Base64;
|
|
|
} catch (error) {
|
|
|
this.logger({
|
|
|
page: "摄像头框",
|
|
@@ -592,7 +605,12 @@ export default {
|
|
|
// console.log(response);
|
|
|
resultUrl = res.data.accessUrl;
|
|
|
signIdentifier = res.data.signIdentifier;
|
|
|
- this.logger({ page: "摄像头框", detail: "抓拍照片保存成功" });
|
|
|
+ this.logger({
|
|
|
+ page: "摄像头框",
|
|
|
+ detail: "抓拍照片保存成功",
|
|
|
+ resultUrl,
|
|
|
+ fileMd5Base64,
|
|
|
+ });
|
|
|
window._hmt.push(["_trackEvent", "摄像头框", "抓拍照片保存成功"]);
|
|
|
} catch (e) {
|
|
|
console.log(e);
|