wzq 5 år sedan
förälder
incheckning
0b45abafde
1 ändrade filer med 3 tillägg och 3 borttagningar
  1. 3 3
      app/Transformers/Post/SuggestTransformer.php

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

@@ -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}",