feat(message): 增加消息分类功能并优化消息列表

- 新增 msgGroup 方法实现消息分类功能
- 优化 msg 方法,支持分页并解析消息内容
- 修改 Circle 控制器中的消息发送逻辑
This commit is contained in:
2025-05-31 18:00:13 +08:00
parent a44f364914
commit 681af2a1ca
2 changed files with 36 additions and 8 deletions

View File

@@ -139,7 +139,7 @@ class Circle extends Base
'name' => '互动消息',
'avatar' => '',
'from_id' => 0,
'target_id' => $circle->user_id,
'user_id' => $circle->user_id,
'content' => json_encode([
'topic' => '点赞',
'content' => $user['nickname'] . '点赞了你的帖子',
@@ -233,9 +233,9 @@ class Circle extends Base
$model->save(['status' => $params['status']]);
(new Message())->allowField(true)->save([ // 消息通知
'type' => 3,
'name' => '系统通知',
'name' => '通知消息',
'avatar' => '',
'from_id' => 0,
'from_id' => 1,
'target_id' => $model->user_id,
'content' => json_encode([
'topic' => '影圈审核',