diff --git a/app/common/controller/MessageNoticeController.php b/app/common/controller/MessageNoticeController.php index d84b428..a0a79db 100644 --- a/app/common/controller/MessageNoticeController.php +++ b/app/common/controller/MessageNoticeController.php @@ -3,6 +3,7 @@ namespace app\common\controller; use app\common\controller\BaseController; use app\common\model\Post; +use app\common\model\PostComment; use app\common\model\PostMedia; use app\common\model\User; use app\common\service\OssService; @@ -64,6 +65,9 @@ class MessageNoticeController extends BaseController $data['sender_user']['avatar_pull'] = $ossservice->generatePrivateUrl($data['sender_user']['avatar']); } } + if (!empty($data['comment_id'])){ + $data['comment'] = PostComment::where('id', $data['comment_id'])->first(); + } return $data; } } \ No newline at end of file