From 0245f2c822eeddd69a0b61c25be61d231535bdcb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=90=B4=E5=B1=95=E9=B9=8F?= Date: Sat, 6 Dec 2025 01:24:48 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BD=BF=E7=94=A8data-duration=E5=B1=9E?= =?UTF-8?q?=E6=80=A7=E4=BF=AE=E5=A4=8D=E6=9C=8D=E5=8A=A1=E6=97=B6=E9=95=BF?= =?UTF-8?q?=E9=80=89=E6=8B=A9=E6=8C=89=E9=92=AE=E7=8A=B6=E6=80=81=E6=9B=B4?= =?UTF-8?q?=E6=96=B0=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pending_bookings.php | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/pending_bookings.php b/pending_bookings.php index 687ec8f..207795f 100644 --- a/pending_bookings.php +++ b/pending_bookings.php @@ -615,14 +615,14 @@ try {
- - - - - - - - + + + + + + + +
@@ -856,8 +856,9 @@ try { // 更新按钮选中状态 durationButtons.forEach(btn => { - // 检查按钮的onclick属性是否包含当前的分钟数 - if (btn.onclick && btn.onclick.toString().includes(`selectDuration(${submissionId}, ${minutes})`)) { + // 使用data-duration属性来检查按钮对应的时长 + const btnDuration = parseInt(btn.getAttribute('data-duration')); + if (btnDuration === minutes) { btn.classList.add('selected'); } else { btn.classList.remove('selected');