From 63d2092c24f6431beec9b12305a2020381e3e452 Mon Sep 17 00:00:00 2001
From: MingNian <1281442923@qq.com>
Date: Wed, 10 Jun 2026 18:27:38 +0800
Subject: [PATCH] =?UTF-8?q?feat:=20UI=E5=85=A8=E9=9D=A2=E6=94=B9=E9=80=A0?=
=?UTF-8?q?=20+=20=E5=90=8E=E7=AB=AF=E5=A4=9A=E9=A1=B9=E4=BF=AE=E5=A4=8D?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
【后端修复】
- 删除diet/consultation agent假工具声明
- 修复DayOfWeek实体注释
- 修复Vision API content序列化
- cleanup_service级联删除修复
- 用药提醒时区偏差修复
- 统一DateTime处理(UtcNow+8)
- 新增UTC DateTime JSON转换器
【前端UI重构】
- 配色体系全面更新(#8B5CF6淡紫+#F0ECFF背景)
- 登录页重设计
- 首页重设计(透明顶栏、渐变背景、胶囊输入区)
- 聊天卡片加白蓝边框、渐变标题
- 侧边栏重构(渐变背景、合并顶部、删除底部设置)
- 确认卡片可编辑字段恢复
- 所有子页面加返回按钮
- catch异常加日志
- 删除后refresh provider缓存
---
.../Health.Domain/Entities/exercise_plan.cs | 4 +-
.../consultation_agent_handler.cs | 13 +-
.../AI/AgentHandlers/diet_agent_handler.cs | 9 +-
.../AgentHandlers/exercise_agent_handler.cs | 2 +-
.../AgentHandlers/medication_agent_handler.cs | 6 +-
.../AI/open_ai_compatible_client.cs | 2 +-
.../AI/prompt_manager.cs | 2 +-
.../Data/dev_data_seeder.cs | 4 +-
.../BackgroundServices/cleanup_service.cs | 22 +-
.../medication_reminder_service.cs | 15 +-
.../Endpoints/ai_chat_endpoints.cs | 8 +-
.../Health.WebApi/Endpoints/diet_endpoints.cs | 2 +-
.../Endpoints/exercise_endpoints.cs | 4 +-
.../Endpoints/medication_endpoints.cs | 14 +-
.../Health.WebApi/Endpoints/user_endpoints.cs | 6 +-
backend/src/Health.WebApi/Program.cs | 4 +-
.../src/Health.WebApi/UtcDateTimeConverter.cs | 24 +
docs/BUG_REVIEW.md | 438 +++++++++++++++
health_app/lib/core/api_client.dart | 2 +-
health_app/lib/core/app_colors.dart | 248 ++++-----
health_app/lib/core/app_theme.dart | 107 ++--
health_app/lib/main.dart | 7 +
health_app/lib/pages/auth/login_page.dart | 287 +++++-----
health_app/lib/pages/chart/trend_page.dart | 2 +-
.../lib/pages/device/device_scan_page.dart | 22 +-
.../lib/pages/diet/diet_capture_page.dart | 170 +++---
health_app/lib/pages/home/home_page.dart | 246 ++++-----
.../home/widgets/chat_messages_view.dart | 69 ++-
.../medication/medication_checkin_page.dart | 28 +-
.../medication/medication_edit_page.dart | 15 +-
.../medication/medication_list_page.dart | 94 ++--
.../lib/pages/profile/profile_page.dart | 229 +++++---
health_app/lib/pages/remaining_pages.dart | 397 +++++++-------
.../lib/pages/report/ai_analysis_page.dart | 75 +--
health_app/lib/pages/report/report_pages.dart | 128 ++---
.../settings/notification_prefs_page.dart | 35 +-
.../lib/pages/settings/settings_pages.dart | 31 +-
health_app/lib/providers/auth_provider.dart | 6 +-
health_app/lib/providers/chat_provider.dart | 25 +
.../lib/providers/consultation_provider.dart | 6 +-
.../lib/services/omron_ble_service.dart | 2 +-
health_app/lib/widgets/common_widgets.dart | 67 ++-
health_app/lib/widgets/health_drawer.dart | 505 ++++++++----------
health_app/pubspec.lock | 48 ++
health_app/pubspec.yaml | 1 +
health_app/test/widget_test.dart | 3 +-
46 files changed, 2003 insertions(+), 1431 deletions(-)
create mode 100644 backend/src/Health.WebApi/UtcDateTimeConverter.cs
create mode 100644 docs/BUG_REVIEW.md
diff --git a/backend/src/Health.Domain/Entities/exercise_plan.cs b/backend/src/Health.Domain/Entities/exercise_plan.cs
index 595e204..3ffe1d0 100644
--- a/backend/src/Health.Domain/Entities/exercise_plan.cs
+++ b/backend/src/Health.Domain/Entities/exercise_plan.cs
@@ -7,7 +7,7 @@ public sealed class ExercisePlan
{
public Guid Id { get; set; }
public Guid UserId { get; set; }
- public DateOnly WeekStartDate { get; set; } // 本周一
+ public DateOnly WeekStartDate { get; set; } // 起始日期
public DateTime CreatedAt { get; set; } = DateTime.UtcNow;
public DateTime UpdatedAt { get; set; } = DateTime.UtcNow;
@@ -22,7 +22,7 @@ public sealed class ExercisePlanItem
{
public Guid Id { get; set; }
public Guid PlanId { get; set; }
- public int DayOfWeek { get; set; } // 0=周一, 6=周日
+ public int DayOfWeek { get; set; } // C# DayOfWeek: 0=周日, 6=周六
public string ExerciseType { get; set; } = string.Empty; // 散步/慢跑/游泳
public int DurationMinutes { get; set; }
public bool IsCompleted { get; set; }
diff --git a/backend/src/Health.Infrastructure/AI/AgentHandlers/consultation_agent_handler.cs b/backend/src/Health.Infrastructure/AI/AgentHandlers/consultation_agent_handler.cs
index b5acb28..2f21b0d 100644
--- a/backend/src/Health.Infrastructure/AI/AgentHandlers/consultation_agent_handler.cs
+++ b/backend/src/Health.Infrastructure/AI/AgentHandlers/consultation_agent_handler.cs
@@ -1,20 +1,11 @@
namespace Health.Infrastructure.AI.AgentHandlers;
///
-/// AI 问诊 Agent 工具处理器——转医生
+/// 问诊 Agent 工具处理器(问诊转医生走专门界面,此处只保留档案和记录查询)
///
public static class ConsultationAgentHandler
{
- public static readonly ToolDefinition RequestDoctorTool = new()
- {
- Function = new()
- {
- Name = "request_doctor", Description = "请求转接真人医生",
- Parameters = new { type = "object", properties = new { reason = new { type = "string" }, urgency_level = new { type = "string" } } }
- }
- };
-
- public static List Tools => [CommonAgentHandler.QueryHealthRecordsTool, CommonAgentHandler.CheckArchiveTool, RequestDoctorTool];
+ public static List Tools => [CommonAgentHandler.QueryHealthRecordsTool, CommonAgentHandler.CheckArchiveTool];
public static Task