|
@@ -10,8 +10,7 @@
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="faceIdDiv" style="position: relative;
|
|
<div id="faceIdDiv" style="position: relative;
|
|
- height:620px;
|
|
|
|
- background-color: #6e6f72!important;
|
|
|
|
|
|
+ height:620px; background-color: #6e6f72!important;
|
|
background-image: radial-gradient(circle at 50% 0,#a9a9a9,#34363c);">
|
|
background-image: radial-gradient(circle at 50% 0,#a9a9a9,#34363c);">
|
|
<div v-show="!showIframe" width="100%" height="200px" style="text-align: center;line-height:100px;margin-top:5px;">
|
|
<div v-show="!showIframe" width="100%" height="200px" style="text-align: center;line-height:100px;margin-top:5px;">
|
|
<div style="color:white;font-weight: bold;font-size:20px;">
|
|
<div style="color:white;font-weight: bold;font-size:20px;">
|
|
@@ -97,19 +96,10 @@ export default {
|
|
const examRecordId = this.$route.params.examRecordDataId;
|
|
const examRecordId = this.$route.params.examRecordDataId;
|
|
|
|
|
|
this.timeCount = 60; //人脸检测倒计时60秒
|
|
this.timeCount = 60; //人脸检测倒计时60秒
|
|
- var timeInterval = setInterval(() => {
|
|
|
|
- if (!this.showIframe) {
|
|
|
|
- clearInterval(timeInterval);
|
|
|
|
- return;
|
|
|
|
- }
|
|
|
|
|
|
+ var timeCountInterval = setInterval(() => {
|
|
--this.timeCount;
|
|
--this.timeCount;
|
|
if (this.timeCount === 0) {
|
|
if (this.timeCount === 0) {
|
|
- this.$Message.error({
|
|
|
|
- content: "人脸检测超时,系统退出,请重新登录",
|
|
|
|
- duration: 15
|
|
|
|
- });
|
|
|
|
- clearInterval(timeInterval);
|
|
|
|
- this.logout();
|
|
|
|
|
|
+ clearInterval(timeCountInterval);
|
|
}
|
|
}
|
|
}, 1000);
|
|
}, 1000);
|
|
|
|
|
|
@@ -130,6 +120,10 @@ export default {
|
|
var receivedMsg = response.data;
|
|
var receivedMsg = response.data;
|
|
that.faceTestEnd(receivedMsg);
|
|
that.faceTestEnd(receivedMsg);
|
|
}
|
|
}
|
|
|
|
+ })
|
|
|
|
+ .catch(() => {
|
|
|
|
+ clearInterval(timeCountInterval);
|
|
|
|
+ this.logout();
|
|
});
|
|
});
|
|
}, 60000); //60000
|
|
}, 60000); //60000
|
|
/**
|
|
/**
|
|
@@ -205,10 +199,10 @@ export default {
|
|
ws.onmessage = response => {
|
|
ws.onmessage = response => {
|
|
if (response.data.indexOf("verifyResult") > -1) {
|
|
if (response.data.indexOf("verifyResult") > -1) {
|
|
var receivedMsg = JSON.parse(response.data);
|
|
var receivedMsg = JSON.parse(response.data);
|
|
|
|
+ this.faceTestEnd(receivedMsg);
|
|
clearTimeout(faceIdTime);
|
|
clearTimeout(faceIdTime);
|
|
this.$emit("closeFaceId");
|
|
this.$emit("closeFaceId");
|
|
ws.close();
|
|
ws.close();
|
|
- this.faceTestEnd(receivedMsg);
|
|
|
|
}
|
|
}
|
|
};
|
|
};
|
|
ws.onclose = function() {
|
|
ws.onclose = function() {
|