feat(用药管理): 集成AI智能分析功能,提供用药依从性深度洞察和专业健康建议
This commit is contained in:
@@ -189,9 +189,13 @@ export class NotificationService {
|
||||
} else if (data?.type === 'goal_achievement') {
|
||||
// 处理目标达成通知
|
||||
console.log('用户点击了目标达成通知');
|
||||
} else if (data?.type === 'mood_checkin') {
|
||||
} else if (data?.type === 'mood_checkin' || data?.type === 'mood_checkin_reminder') {
|
||||
// 处理心情打卡提醒
|
||||
console.log('用户点击了心情打卡提醒');
|
||||
router.push({
|
||||
pathname: '/mood/edit',
|
||||
params: { date: new Date().toISOString().split('T')[0] }
|
||||
} as any);
|
||||
} else if (data?.type === 'goal_reminder') {
|
||||
// 处理目标提醒通知
|
||||
console.log('用户点击了目标提醒通知', data);
|
||||
@@ -221,13 +225,21 @@ export class NotificationService {
|
||||
if (data?.url) {
|
||||
router.push(data.url as any);
|
||||
}
|
||||
} else if (data?.type === 'water_reminder' || data?.type === 'regular_water_reminder') {
|
||||
} else if (data?.type === 'water_reminder' || data?.type === 'regular_water_reminder' || data?.type === 'custom_water_reminder') {
|
||||
// 处理喝水提醒通知
|
||||
console.log('用户点击了喝水提醒通知', data);
|
||||
// 跳转到统计页面查看喝水进度
|
||||
if (data?.url) {
|
||||
router.push(data.url as any);
|
||||
}
|
||||
} else if (data?.type === 'daily_summary' || data?.type === 'daily_summary_reminder') {
|
||||
// 处理每日总结通知
|
||||
console.log('用户点击了每日总结通知', data);
|
||||
if (data?.url) {
|
||||
router.push(data.url as any);
|
||||
} else {
|
||||
router.push('/(tabs)/statistics' as any);
|
||||
}
|
||||
} else if (data?.type === NotificationTypes.FASTING_START || data?.type === NotificationTypes.FASTING_END) {
|
||||
router.push(ROUTES.TAB_FASTING as any);
|
||||
} else if (data?.type === NotificationTypes.WORKOUT_COMPLETION) {
|
||||
|
||||
Reference in New Issue
Block a user