|
@@ -250,15 +250,21 @@ function getFaceDetectorOptions() {
|
|
|
|
|
|
let displayedMsg: MessageReactive | null = null;
|
|
|
const indepentExamingMsg = throttle(
|
|
|
- () => (displayedMsg = $message.warning("请独立完成考试")),
|
|
|
+ () =>
|
|
|
+ document.getElementById("video") &&
|
|
|
+ (displayedMsg = $message.warning("请独立完成考试")),
|
|
|
20 * 1000
|
|
|
);
|
|
|
const posureExamingMsg = throttle(
|
|
|
- () => (displayedMsg = $message.warning("请调整坐姿,诚信考试")),
|
|
|
+ () =>
|
|
|
+ document.getElementById("video") &&
|
|
|
+ (displayedMsg = $message.warning("请调整坐姿,诚信考试")),
|
|
|
20 * 1000
|
|
|
);
|
|
|
const bgCheckExamingMsg = throttle(
|
|
|
- () => $message.warning("请保持正确坐姿,确保脸部在摄像头内,背景无强光。"),
|
|
|
+ () =>
|
|
|
+ document.getElementById("video") &&
|
|
|
+ $message.warning("请保持正确坐姿,确保脸部在摄像头内,背景无强光。"),
|
|
|
20 * 1000
|
|
|
);
|
|
|
|