From 797fd31d26f6b2541efbeb030785dc49bef94985 Mon Sep 17 00:00:00 2001 From: al Date: Thu, 16 Jan 2025 14:46:58 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A7=A3=E5=BC=80=E8=BD=AE=E8=AF=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pay/[zid]/[product_id]/[moment_id]/page.jsx | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/app/zone/pay/[zid]/[product_id]/[moment_id]/page.jsx b/app/zone/pay/[zid]/[product_id]/[moment_id]/page.jsx index eb93542..9d2f996 100644 --- a/app/zone/pay/[zid]/[product_id]/[moment_id]/page.jsx +++ b/app/zone/pay/[zid]/[product_id]/[moment_id]/page.jsx @@ -111,11 +111,14 @@ export default function Pay({ params }) { getData(); getSuperfanshipData(); }, 500); - // const intervalId = setInterval(() => { - // getData(); - // getSuperfanshipData(); - // }, 2000); - return () => clearTimeout(timer); + const intervalId = setInterval(() => { + getData(); + getSuperfanshipData(); + }, 2000); + return () => { + clearInterval(intervalId); + clearTimeout(timer); + }; }, []); //是否勾选购买超粉switch组件