@@ -84,6 +84,7 @@
const emits = defineEmits(['init', 'success', 'error', 'cancel', 'progress'])
let timer1 = null;
+ let timer2 = null;
function noShowVideoBtn() {
showVideo.value = false
@@ -148,7 +149,7 @@
startCamera()
// 设定计时器
console.log('抓拍设定', zhuapai.value)
- setInterval(() => {
+ timer2 = setInterval(() => {
handleZhua()
}, zhuapai.value * 60 * 1000)
})
@@ -431,6 +432,10 @@
clearTimeout(stopTimer.value);
stopTimer.value = null;
}
+ if (timer2) {
+ clearTimeout(timer2);
+ timer2 = null;
+ }
defineExpose({