From 2ee30fe2bbe3e26ba6738956505d918438057a37 Mon Sep 17 00:00:00 2001 From: Roozen <93673944+Roozenlz@users.noreply.github.com> Date: Fri, 4 Aug 2023 01:09:29 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E9=A1=B5=E8=84=9A=E6=A0=B7?= =?UTF-8?q?=E5=BC=8F=E4=B8=80=E5=9B=BE=E7=89=87=E5=8A=A0=E8=BD=BD=20(#368)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- templates/modules/common/footer-style-one.html | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/templates/modules/common/footer-style-one.html b/templates/modules/common/footer-style-one.html index c5339b1e..20bcd28b 100644 --- a/templates/modules/common/footer-style-one.html +++ b/templates/modules/common/footer-style-one.html @@ -39,13 +39,15 @@ n = (t / 1496e5).toFixed(6) } - if (!(nowHour < 18 && nowHour >= 9)) { - // 如果是下班时间,插入"困困鱼-下班啦.svg"图片 - let img = document.querySelector("#workboard .workSituationImg"); - img.src = "[[${theme.config.footer.footerContent.style_one.offduty_img}]]"; - img.title = "[[${theme.config.footer.footerContent.style_one.offduty_description}]]"; - img.alt = "[[${theme.config.footer.footerContent.style_one.offduty_description}]]"; - } + setTimeout(()=>{ + if (!(nowHour < 18 && nowHour >= 9)) { + // 如果是下班时间,插入"困困鱼-下班啦.svg"图片 + let img = document.querySelector("#workboard .workSituationImg"); + img.src = "[[${theme.config.footer.footerContent.style_one.offduty_img}]]"; + img.title = "[[${theme.config.footer.footerContent.style_one.offduty_description}]]"; + img.alt = "[[${theme.config.footer.footerContent.style_one.offduty_description}]]"; + } + },1000) // 更新网页中显示的网站运行时间 function updateHtml() {