From f9aa5118069902ef3f0d6b7ab626f475458db348 Mon Sep 17 00:00:00 2001 From: root Date: Wed, 10 Dec 2025 15:53:53 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E4=B8=89=E4=B8=AA=E5=85=B3?= =?UTF-8?q?=E9=94=AEBug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 1. 修复定时任务设置时间不执行问题 - 将定时任务检查频率从60秒提升到5秒 - 确保定时任务在设定时间准时执行 - 位置: app.py 第3010-3011行 2. 修复账号管理卡片设置按钮无法点击问题 - 修正JavaScript引号转义错误 - 位置: templates/index.html 第886行 3. 修复用户反馈和后台反馈进度不同步问题 - 前端改为检查status字段而非reply字段 - 新增closed状态支持 - 正确显示待处理/已回复/已关闭三种状态 - 位置: templates/index.html 第249-251行, 第1550-1567行 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- app.py | 4 ++-- templates/index.html | 18 ++++++++++++++---- 2 files changed, 16 insertions(+), 6 deletions(-) diff --git a/app.py b/app.py index 8cf8cb7..9494fcd 100755 --- a/app.py +++ b/app.py @@ -3007,8 +3007,8 @@ def scheduled_task_worker(): # 执行待执行的任务 schedule.run_pending() - # 每60秒重新检查一次配置 - if time.time() - last_check > 60: + # 每5秒重新检查一次配置(提高检查频率以确保定时任务准时执行) + if time.time() - last_check > 5: check_and_schedule() check_user_schedules() # 检查用户定时任务 last_check = time.time() diff --git a/templates/index.html b/templates/index.html index 6f5fb36..5f1302e 100644 --- a/templates/index.html +++ b/templates/index.html @@ -248,6 +248,7 @@ .feedback-item-status { display: inline-block; padding: 2px 8px; border-radius: 4px; font-size: 12px; margin-left: 8px; } .feedback-status-pending { background: #FFF3E0; color: #EF6C00; } .feedback-status-replied { background: #E8F5E9; color: #2E7D32; } + .feedback-status-closed { background: #ECEFF1; color: #546E7A; } @media (max-width: 768px) { .sidebar { width: 100%; position: fixed; top: auto; bottom: 0; height: 60px; border-right: none; border-top: 1px solid var(--md-divider); display: flex; overflow-x: auto; } @@ -882,7 +883,7 @@ '' + '' + '' + - '' + + '' + '' + ''; } @@ -1547,13 +1548,22 @@ } let html = ''; data.forEach(function(f) { - const statusClass = f.reply ? 'feedback-status-replied' : 'feedback-status-pending'; - const statusText = f.reply ? '已回复' : '待处理'; + // 根据status字段确定状态显示 + let statusClass = 'feedback-status-pending'; + let statusText = '待处理'; + if (f.status === 'replied') { + statusClass = 'feedback-status-replied'; + statusText = '已回复'; + } else if (f.status === 'closed') { + statusClass = 'feedback-status-closed'; + statusText = '已关闭'; + } + html += ''; }); container.innerHTML = html;