wzq пре 5 година
родитељ
комит
e6eb108e1f
1 измењених фајлова са 7 додато и 7 уклоњено
  1. 7 7
      app/Transformers/Post/SuggestTransformer.php

+ 7 - 7
app/Transformers/Post/SuggestTransformer.php

@@ -48,10 +48,10 @@ class SuggestTransformer extends TransformerAbstract
             ];
         }
         $isFollow = 0;
-        $followStatus = $this->getFollowStatus($this->uid, $post['uid']);
-        if($followStatus){
-            $isFollow = $followStatus;
-        }
+//        $followStatus = $this->getFollowStatus($this->uid, $post['uid']);
+//        if($followStatus){
+//            $isFollow = $followStatus;
+//        }
         return [
             'show_type' => 'post',
             'id' => $post['id'],
@@ -72,9 +72,9 @@ class SuggestTransformer extends TransformerAbstract
             'comment_count' => $post->data->comment_count,
             'collect_count' => $post->data->collect_count,
             'will_collect_bean' => $post->data->will_collect_bean + 3 * $post->data->pv,
-            'is_like' => PostLike::where('post_id', $post['id'])->where('uid', $this->uid)->exists()?1:0,
-            'is_dislike' => PostDislike::where('post_id', $post['id'])->where('uid', $this->uid)->exists()?1:0,
-            'is_collect' => PostCollect::where('post_id', $post['id'])->where('uid', $this->uid)->exists()?1:0,
+//            'is_like' => PostLike::where('post_id', $post['id'])->where('uid', $this->uid)->exists()?1:0,
+//            'is_dislike' => PostDislike::where('post_id', $post['id'])->where('uid', $this->uid)->exists()?1:0,
+//            'is_collect' => PostCollect::where('post_id', $post['id'])->where('uid', $this->uid)->exists()?1:0,
             'comment' => $comment,
             'is_follow' => $isFollow,
             'h5url' => config('customer.share_post_h5url')."?post_id={$post['id']}&invite_code={$this->invite_code}",