From a1a7c99ead74729c16bd81205ec0bc3df787eef2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BA=8E=E8=82=96=E7=A3=8A?= <18851179580@163.com> Date: Fri, 20 Sep 2024 18:15:23 +0800 Subject: [PATCH] =?UTF-8?q?=E7=A7=92=E6=9D=80=E9=80=BB=E8=BE=91=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/diy/seckill.vue | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/components/diy/seckill.vue b/components/diy/seckill.vue index c0c8798b..ff111014 100644 --- a/components/diy/seckill.vue +++ b/components/diy/seckill.vue @@ -246,7 +246,10 @@ this.init(); }, beforeDestroy() { - clearInterval(this.intervalId); + // 如果有定时任务执行,在离开的时候清空掉定时任务 + if (!isEmpty(this.intervalId)) { + clearInterval(this.intervalId); + } }, methods: { isEmpty, @@ -330,7 +333,6 @@ // 存储数据显示 let nav_list = []; cloneList.forEach(item => { - console.log(item); nav_list.push({ split_list: [ item ], });