From 6278b80d1bffea804e565159d31237961fd5c519 Mon Sep 17 00:00:00 2001 From: fanluyan <754122931@qq.com> Date: Tue, 17 Oct 2023 17:44:04 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/realTimeMonitor/index.vue | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/views/realTimeMonitor/index.vue b/src/views/realTimeMonitor/index.vue index 64df7f1..b9ad789 100644 --- a/src/views/realTimeMonitor/index.vue +++ b/src/views/realTimeMonitor/index.vue @@ -879,6 +879,8 @@ export default { message: "下发指令成功!", type: "success", }); + clearInterval(this.timer); + this.timer = null; this.timer = window.setInterval(() => { this.newPicApi(); this.i++; @@ -912,8 +914,9 @@ export default { // // console.log(this.i); if (res.data == true && this.i < 10) { console.log(res.data); - this.i = 0; + clearInterval(this.timer); + this.i = 0; this.timer = null; this.btnpicloading = false; this.btnvideoloading = false; @@ -930,9 +933,9 @@ export default { }); console.log("返回最新图片"); } else if (res.data == false && this.i > 10) { - this.i = 0; clearInterval(this.timer); this.timer = null; + this.i = 0; } }); },