|
@@ -134,10 +134,34 @@ export default {
|
|
|
if (faceEnable.data) {
|
|
|
this.faceEnable = true;
|
|
|
|
|
|
- setTimeout(() => {
|
|
|
- this.serverLog("debug/S-002001", "进入考试后5秒抓拍");
|
|
|
- this.toggleSnapNow(); // 开启抓拍才在进入考试时抓拍一张
|
|
|
- }, 5 * 1000); // 5秒钟后抓拍
|
|
|
+ // setTimeout(() => {
|
|
|
+ // this.serverLog("debug/S-002001", "进入考试后60秒内抓拍");
|
|
|
+ // this.toggleSnapNow(); // 开启抓拍才在进入考试时抓拍一张
|
|
|
+ // }, 60 * 1000); // 60内秒钟后抓拍
|
|
|
+
|
|
|
+ let initSnapshotTrialTimes = 0;
|
|
|
+ this.initSnapInterval = setInterval(() => {
|
|
|
+ if (this.exam || initSnapshotTrialTimes > 12) {
|
|
|
+ clearInterval(this.initSnapInterval);
|
|
|
+ this.serverLog(
|
|
|
+ "debug/S-002001",
|
|
|
+ "进入考试后60秒内抓拍" + `(${(initSnapshotTrialTimes + 1) * 5}秒)`
|
|
|
+ );
|
|
|
+ this.toggleSnapNow(); // 开启抓拍才在进入考试时抓拍一张
|
|
|
+ } else {
|
|
|
+ initSnapshotTrialTimes++;
|
|
|
+ }
|
|
|
+ }, 5 * 1000);
|
|
|
+
|
|
|
+ // let initSnapshotTrialTimes = 0;
|
|
|
+ // const initSnapshot = setTimeout(() => {
|
|
|
+ // if (this.exam || initSnapshotTrialTimes < 6) {
|
|
|
+ // this.serverLog("debug/S-002001", "进入考试后60秒内抓拍");
|
|
|
+ // this.toggleSnapNow(); // 开启抓拍才在进入考试时抓拍一张
|
|
|
+ // } else {
|
|
|
+ // setTimeout(() => initSnapshot(), 5 * 1000);
|
|
|
+ // }
|
|
|
+ // }, 5 * 1000); // 60内秒钟后抓拍
|
|
|
|
|
|
try {
|
|
|
const snapshotInterval = await this.$http.get(
|
|
@@ -212,6 +236,7 @@ export default {
|
|
|
beforeDestroy() {
|
|
|
clearTimeout(this.timeoutTimeout);
|
|
|
clearInterval(this.submitInterval);
|
|
|
+ clearInterval(this.initSnapInterval);
|
|
|
clearInterval(this.snapInterval);
|
|
|
clearTimeout(this.faceIdMsgTimeout);
|
|
|
clearTimeout(this.faceIdDivTimeout);
|