添加”校准功能“
This commit is contained in:
parent
0ad9ffa028
commit
18bb4f16f5
12
gncs.html
12
gncs.html
@ -110,6 +110,11 @@
|
||||
<span>屏幕锁定密码解锁</span>
|
||||
<div class="toggle-btn" id="unlock-btn"></div>
|
||||
</div>
|
||||
|
||||
<div class="function-item">
|
||||
<span>测量大小校准</span>
|
||||
<div class="toggle-btn" id="calibrateBtn"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- JavaScript -->
|
||||
@ -118,6 +123,7 @@
|
||||
const cameraBtn = document.getElementById('camera-btn');
|
||||
const faceBtn = document.getElementById('face-btn');
|
||||
const unlockBtn = document.getElementById('unlock-btn');
|
||||
const calibrateBtn = document.getElementById('calibrateBtn');
|
||||
|
||||
// 存储当前打开的测试按钮
|
||||
let activeButton = null;
|
||||
@ -146,6 +152,12 @@
|
||||
cameraBtn.addEventListener('click', () => toggleButton(cameraBtn, '摄像头'));
|
||||
faceBtn.addEventListener('click', () => toggleButton(faceBtn, '人脸距离过近'));
|
||||
unlockBtn.addEventListener('click', () => toggleButton(unlockBtn, '屏幕锁定密码解锁'));
|
||||
unlockBtn.addEventListener('click', () => {
|
||||
toggleButton(calibrateBtn, '测量大小校准');
|
||||
alert('请保持脸在距离摄像头30cm处,进行校准');
|
||||
});
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
<!-- 导航栏 -->
|
||||
|
Loading…
Reference in New Issue
Block a user