From 37460b22d6742dca3ce2d3ad0ddc50a096795f37 Mon Sep 17 00:00:00 2001 From: wanghongjun <1445693971@qq.com> Date: Mon, 7 Jul 2025 15:45:57 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9C=8B=E5=8F=8B=E5=9C=88=E6=B6=88=E6=81=AF?= =?UTF-8?q?=E6=8F=90=E9=86=92=E6=8E=A5=E5=8F=A3=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/enterprise/controller/Posts.php | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/app/enterprise/controller/Posts.php b/app/enterprise/controller/Posts.php index 639c029..c6c6557 100644 --- a/app/enterprise/controller/Posts.php +++ b/app/enterprise/controller/Posts.php @@ -634,11 +634,9 @@ class Posts extends BaseController if ($comment['user_id']) { $item['option_user'] = $this->getFriendUserInfo($comment['user_id']); } - if ($comment['relevance_id']) { - $item['posts_user_id'] = PostsModel::where('id', $comment['relevance_id'])->value('user_id'); - } } } + $item['posts_user_id'] = PostsModel::where('id', $item['posts_id'])->value('user_id'); if ($item['type'] == 1) { $likesWhere = [ 'id' => $item['relevance_id'], @@ -649,9 +647,6 @@ class Posts extends BaseController if ($Likes['user_id']) { $item['option_user'] = $this->getFriendUserInfo($Likes['user_id']); } - if ($Likes['relevance_id']) { - $item['posts_user_id'] = PostsModel::where('id', $Likes['relevance_id'])->value('user_id'); - } } } // 用户信息