Explorar o código

进入考试后摄像头初始化宽容设置

Michael Wang %!s(int64=6) %!d(string=hai) anos
pai
achega
2405eb5a0c
Modificáronse 1 ficheiros con 5 adicións e 1 borrados
  1. 5 1
      src/features/OnlineExam/Examing/ExamingHome.vue

+ 5 - 1
src/features/OnlineExam/Examing/ExamingHome.vue

@@ -136,7 +136,11 @@ export default {
 
       let initSnapshotTrialTimes = 0;
       this.initSnapInterval = setInterval(() => {
-        if (this.exam || initSnapshotTrialTimes > 12) {
+        if (
+          // 在数据取完,并且超过30秒后,摄像头必须工作正常才行。或者超过60秒后,直接抓拍。
+          (this.exam && initSnapshotTrialTimes > 5) ||
+          initSnapshotTrialTimes > 10
+        ) {
           clearInterval(this.initSnapInterval);
           this.serverLog(
             "debug/S-002001",