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 += '