|
@@ -252,22 +252,23 @@ export default {
|
|
*/
|
|
*/
|
|
async faceTestUploadResult(result) {
|
|
async faceTestUploadResult(result) {
|
|
let endRes;
|
|
let endRes;
|
|
- for (let i = 0; i < 20; i++) {
|
|
|
|
- endRes = await this.$http.get(
|
|
|
|
- "/api/ecs_oe_student/examFaceLivenessVerify/faceLivenessVerifyEnd/" +
|
|
|
|
- this.examRecordId +
|
|
|
|
- "?result=" +
|
|
|
|
- result
|
|
|
|
- );
|
|
|
|
- console.log(endRes);
|
|
|
|
- if (endRes.data.code === "S-101000") {
|
|
|
|
- continue;
|
|
|
|
- } else if (endRes.data.code === "000000") {
|
|
|
|
- break;
|
|
|
|
|
|
+ try {
|
|
|
|
+ for (let i = 0; i < 20; i++) {
|
|
|
|
+ endRes = await this.$http.get(
|
|
|
|
+ "/api/ecs_oe_student/examFaceLivenessVerify/faceLivenessVerifyEnd/" +
|
|
|
|
+ this.examRecordId +
|
|
|
|
+ "?result=" +
|
|
|
|
+ result
|
|
|
|
+ );
|
|
|
|
+ console.log(endRes);
|
|
|
|
+ if (endRes.data.code === "S-101000") {
|
|
|
|
+ await new Promise(resolve => setTimeout(() => resolve(), 3000));
|
|
|
|
+ continue;
|
|
|
|
+ } else if (endRes.data.code === "000000") {
|
|
|
|
+ break;
|
|
|
|
+ }
|
|
}
|
|
}
|
|
- await new Promise(resolve => setTimeout(() => resolve(), 3000));
|
|
|
|
- }
|
|
|
|
- if (endRes.data.code !== "000000") {
|
|
|
|
|
|
+ } catch {
|
|
this.$Message.error({
|
|
this.$Message.error({
|
|
content: "上传人脸检测结果出错!",
|
|
content: "上传人脸检测结果出错!",
|
|
duration: 15,
|
|
duration: 15,
|
|
@@ -279,6 +280,21 @@ export default {
|
|
"上传人脸检测结果出错!",
|
|
"上传人脸检测结果出错!",
|
|
]);
|
|
]);
|
|
this.logout("?LogoutReason=上传人脸检测结果出错!");
|
|
this.logout("?LogoutReason=上传人脸检测结果出错!");
|
|
|
|
+ }
|
|
|
|
+ if (endRes.data.code !== "000000") {
|
|
|
|
+ this.$Message.error({
|
|
|
|
+ content: "上传人脸检测结果出错!累积20次,未取到正确结果!",
|
|
|
|
+ duration: 15,
|
|
|
|
+ closable: true,
|
|
|
|
+ });
|
|
|
|
+ window._hmt.push([
|
|
|
|
+ "_trackEvent",
|
|
|
|
+ "活体检测弹出框",
|
|
|
|
+ "上传人脸检测结果出错!累积20次,未取到正确结果!",
|
|
|
|
+ ]);
|
|
|
|
+ this.logout(
|
|
|
|
+ "?LogoutReason=上传人脸检测结果出错!累积20次,未取到正确结果!"
|
|
|
|
+ );
|
|
} else {
|
|
} else {
|
|
if (result != "SUCCESS") {
|
|
if (result != "SUCCESS") {
|
|
this.logout("?LogoutReason=活体检测失败");
|
|
this.logout("?LogoutReason=活体检测失败");
|
|
@@ -387,7 +403,7 @@ export default {
|
|
iframeDomReady = true;
|
|
iframeDomReady = true;
|
|
console.log("faceid iframe dom ready");
|
|
console.log("faceid iframe dom ready");
|
|
iframe.insertCSS(".copyright { display: none !important;}");
|
|
iframe.insertCSS(".copyright { display: none !important;}");
|
|
- // iframe.openDevTools();
|
|
|
|
|
|
+ iframe.openDevTools();
|
|
});
|
|
});
|
|
|
|
|
|
iframe.addEventListener("ipc-message", event => {
|
|
iframe.addEventListener("ipc-message", event => {
|