feat: 添加睡眠详情页面,集成睡眠数据获取功能,优化健康数据权限管理,更新相关组件以支持睡眠统计和展示

This commit is contained in:
richarjiang
2025-09-08 09:54:33 +08:00
parent df7f04808e
commit e91283fe4e
14 changed files with 1186 additions and 261 deletions

View File

@@ -73,7 +73,8 @@ function Bootstrapper({ children }: { children: React.ReactNode }) {
if (userDataLoaded && profile?.name) {
try {
await notificationService.initialize();
// 后台任务
await backgroundTaskManager.initialize()
// 注册午餐提醒12:00
await NutritionNotificationHelpers.scheduleDailyLunchReminder(profile.name);
console.log('午餐提醒已注册');
@@ -86,8 +87,7 @@ function Bootstrapper({ children }: { children: React.ReactNode }) {
await MoodNotificationHelpers.scheduleDailyMoodReminder(profile.name);
console.log('心情提醒已注册');
// 注册喝水提醒后台任务
await backgroundTaskManager.registerWaterReminderTask();
console.log('喝水提醒后台任务已注册');
} catch (error) {
console.error('注册提醒失败:', error);