diff --git a/server/src/XiangYi.Application/Services/NotificationService.cs b/server/src/XiangYi.Application/Services/NotificationService.cs index add63b1..f57e1da 100644 --- a/server/src/XiangYi.Application/Services/NotificationService.cs +++ b/server/src/XiangYi.Application/Services/NotificationService.cs @@ -254,7 +254,8 @@ public class NotificationService : INotificationService unlockerUser?.Nickname ?? "有人", $"编号{unlockerUser?.XiangQinNo ?? "未知"}刚刚访问了您", DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), - "pages/interact/unlockedMe"); + "pages/interact/unlockedMe", + unlockerUser?.Phone); } // 回退到小程序订阅消息 @@ -313,7 +314,8 @@ public class NotificationService : INotificationService favoriterUser?.Nickname ?? "有人", $"编号{favoriterUser?.XiangQinNo ?? "未知"}收藏了您", DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), - "pages/interact/favoritedMe"); + "pages/interact/favoritedMe", + favoriterUser?.Phone); } // 回退到小程序订阅消息 @@ -372,7 +374,8 @@ public class NotificationService : INotificationService senderUser?.Nickname ?? "有人", $"编号{senderUser?.XiangQinNo ?? "未知"}给您发送了一条消息", DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), - "pages/chat/index"); + "pages/chat/index", + senderUser?.Phone); } // 回退到小程序订阅消息 @@ -431,7 +434,8 @@ public class NotificationService : INotificationService senderUser?.Nickname ?? "有人", $"编号{senderUser?.XiangQinNo ?? "未知"}正在等待您的回复", DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), - "pages/chat/index"); + "pages/chat/index", + senderUser?.Phone); } // 回退到小程序订阅消息 @@ -533,7 +537,8 @@ public class NotificationService : INotificationService string name, string content, string time, - string page) + string page, + string? phone = null) { try { @@ -562,6 +567,7 @@ public class NotificationService : INotificationService "name" => name, "content" => content, "time" => time, + "phone" => phone ?? "", "remark" => "点击查看详情", _ => valueKey ?? "" };