diff --git a/templates/index.html b/templates/index.html
index 206daab..d041c7f 100644
--- a/templates/index.html
+++ b/templates/index.html
@@ -1694,8 +1694,22 @@
}
// ==================== 通用函数 ====================
- function openModal(id) { document.getElementById(id).classList.add('active'); }
- function closeModal(id) { document.getElementById(id).classList.remove('active'); }
+ function openModal(id) {
+ const element = document.getElementById(id);
+ console.log('[openModal] 打开弹窗:', id, '元素:', element);
+ if (element) {
+ element.classList.add('active');
+ console.log('[openModal] 已添加active类, classList:', element.classList);
+ } else {
+ console.error('[openModal] 未找到元素:', id);
+ }
+ }
+ function closeModal(id) {
+ const element = document.getElementById(id);
+ if (element) {
+ element.classList.remove('active');
+ }
+ }
function showToast(message, type) {
type = type || 'info';