From 88c6ea456bdd19a4f0cfb1b20c022336fa7a3a17 Mon Sep 17 00:00:00 2001 From: hmo Date: Tue, 28 Jul 2026 11:50:24 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E7=9B=AF=E7=9B=98=E9=98=B2=E9=97=AA?= =?UTF-8?q?=E7=83=81(watchRendering=E5=AE=88=E5=8D=AB+60s=E5=88=B7?= =?UTF-8?q?=E6=96=B0)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- static/index.html | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/static/index.html b/static/index.html index 2b1358a4..464c3131 100644 --- a/static/index.html +++ b/static/index.html @@ -1513,9 +1513,12 @@ function watchResetFilters() { renderWatch(); } +let watchRendering = false; async function renderWatch() { + if (watchRendering) return; + watchRendering = true; const el = document.getElementById('watchContent'); - if (!el) return; + if (!el) { watchRendering = false; return; } try { if (watchTimer) clearInterval(watchTimer); if (!watchChipsInit) { watchRenderChips(); watchChipsInit = true; } @@ -1657,6 +1660,8 @@ async function renderWatch() { } catch(e) { el.innerHTML = '
加载失败: ' + e.message + '
'; watchTimer = setInterval(renderWatch, 60000); + } finally { + watchRendering = false; } }