feat: 互动记录/数据看板自动刷新 + 日志时间格式修复
1. Interactions.vue: 每30秒自动刷新互动记录列表 2. Dashboard.vue: 每30秒自动刷新数据看板 3. Logs.vue: 时间格式修复(T→空格,去掉时区标识) 4. logs.py: created_at 改用 strftime 输出 +08:00 格式(而非 isoformat 的 +00:00) 页面保持浏览时自动获取最新数据,离开页面时自动清除定时器
This commit is contained in:
@@ -37,7 +37,7 @@ async def get_login_logs(
|
||||
items = [{
|
||||
"id": l.id, "user_id": l.user_id, "user_account": l.user_account,
|
||||
"action": l.action, "session_id": l.session_id,
|
||||
"error_msg": l.error_msg, "created_at": l.created_at.isoformat()
|
||||
"error_msg": l.error_msg, "created_at": l.created_at.strftime("%Y-%m-%dT%H:%M:%S+08:00") if l.created_at else None
|
||||
} for l in logs]
|
||||
return ApiResponse(data={"total": total, "page": page, "page_size": page_size, "items": items})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user