wzq пре 5 година
родитељ
комит
d8165229f3
2 измењених фајлова са 2 додато и 1 уклоњено
  1. 1 1
      app/Repositories/PostRepositories.php
  2. 1 0
      app/Transformers/Post/VideoTransformer.php

+ 1 - 1
app/Repositories/PostRepositories.php

@@ -187,7 +187,7 @@ class PostRepositories
             return jsonSuccess([
                 'post_id' => $post->id,
                 'h5url' => config('customer.share_post_h5url')."?post_id={$post->id}&invite_code={$userInfo['invite_code']}",
-                'bean' => config('customer.share_post_bean')
+                'bean' => $post->available_bean,
             ]);
 
         }catch (QueryException $exception){

+ 1 - 0
app/Transformers/Post/VideoTransformer.php

@@ -49,6 +49,7 @@ class VideoTransformer extends TransformerAbstract
             'praise_count' => $post->data->praise_count,
             'collect_count' => $post->data->collect_count,
             'comment_count' => $post->data->comment_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_collect' => PostCollect::where('post_id', $post['id'])->where('uid', $this->uid)->exists()?1:0,
             'is_follow' => $isFollow,