feat: 健康录入提醒 + 多指标异常 + 用药漏服 + UI 优化

后端
- NotificationPreference 增加健康录入提醒总开关和 5 子项(血压/心率/血糖/血氧/体重)
- EF 迁移 AddHealthRecordReminder
- 新增 GET/PUT /api/notification-prefs
- 新增 HealthRecordReminderService 每天 9 点/12 点扫描未录入用户推送提醒

前端
- 通知偏好对接真实后端 API
- 设置页新增「健康录入提醒」总开关+5 子项
- 通知中心右上角加齿轮跳设置页
- 今日健康卡片:4 项异常检测+多项合并;用药只显漏服并按时间窗口区分文案
- 侧边栏头像改圆形白底灰图标,去掉紫色品牌渐变
- 整体背景统一浅灰白 #F6F8FC,去掉浅紫渐变
- 设置页简化(去掉分组/彩色图标方块)
- 健康档案保存按钮移到右上角,TextButton 全局默认黑色
- API baseUrl 跟随网络环境
This commit is contained in:
MingNian
2026-06-24 22:11:21 +08:00
parent 7ff429e071
commit 53ce19e8c3
18 changed files with 2379 additions and 565 deletions

View File

@@ -0,0 +1,84 @@
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace Health.Infrastructure.Data.Migrations
{
/// <inheritdoc />
public partial class AddHealthRecordReminder : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn<bool>(
name: "HealthRecordReminder",
table: "NotificationPreferences",
type: "boolean",
nullable: false,
defaultValue: false);
migrationBuilder.AddColumn<bool>(
name: "HealthRecordReminderBloodPressure",
table: "NotificationPreferences",
type: "boolean",
nullable: false,
defaultValue: false);
migrationBuilder.AddColumn<bool>(
name: "HealthRecordReminderGlucose",
table: "NotificationPreferences",
type: "boolean",
nullable: false,
defaultValue: false);
migrationBuilder.AddColumn<bool>(
name: "HealthRecordReminderHeartRate",
table: "NotificationPreferences",
type: "boolean",
nullable: false,
defaultValue: false);
migrationBuilder.AddColumn<bool>(
name: "HealthRecordReminderSpO2",
table: "NotificationPreferences",
type: "boolean",
nullable: false,
defaultValue: false);
migrationBuilder.AddColumn<bool>(
name: "HealthRecordReminderWeight",
table: "NotificationPreferences",
type: "boolean",
nullable: false,
defaultValue: false);
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "HealthRecordReminder",
table: "NotificationPreferences");
migrationBuilder.DropColumn(
name: "HealthRecordReminderBloodPressure",
table: "NotificationPreferences");
migrationBuilder.DropColumn(
name: "HealthRecordReminderGlucose",
table: "NotificationPreferences");
migrationBuilder.DropColumn(
name: "HealthRecordReminderHeartRate",
table: "NotificationPreferences");
migrationBuilder.DropColumn(
name: "HealthRecordReminderSpO2",
table: "NotificationPreferences");
migrationBuilder.DropColumn(
name: "HealthRecordReminderWeight",
table: "NotificationPreferences");
}
}
}

View File

@@ -679,6 +679,24 @@ namespace Health.Infrastructure.Data.Migrations
b.Property<bool>("FollowUpReminder")
.HasColumnType("boolean");
b.Property<bool>("HealthRecordReminder")
.HasColumnType("boolean");
b.Property<bool>("HealthRecordReminderBloodPressure")
.HasColumnType("boolean");
b.Property<bool>("HealthRecordReminderGlucose")
.HasColumnType("boolean");
b.Property<bool>("HealthRecordReminderHeartRate")
.HasColumnType("boolean");
b.Property<bool>("HealthRecordReminderSpO2")
.HasColumnType("boolean");
b.Property<bool>("HealthRecordReminderWeight")
.HasColumnType("boolean");
b.Property<bool>("MedicationReminder")
.HasColumnType("boolean");