Explorar o código

待收取彩虹豆

wzq %!s(int64=5) %!d(string=hai) anos
pai
achega
20ba13852e

+ 1 - 1
app/Repositories/FeedRepositories.php

@@ -169,7 +169,7 @@ class FeedRepositories
             'praise_count' => $post->data->praise_count,
             'comment_count' => $post->data->comment_count,
             'available_bean' => $post->data->available_bean,
-            'will_collect_bean' => $post->data->will_collect_bean,
+            'will_collect_bean' => $post->data->will_collect_bean + 3 * $post->data->pv,
             'post_comment' => $this->getPostComment($post['id']),
             'is_like' => PostLike::where('post_id', $post['id'])->where('uid', $uid)->exists()?1:0,
             'is_dislike' => PostDislike::where('post_id', $post['id'])->where('uid', $uid)->exists()?1:0,

+ 1 - 1
app/Repositories/PostRepositories.php

@@ -543,7 +543,7 @@ class PostRepositories
                 'id' => $topic->id,
                 'name' => $topic->name,
                 'img' => $topic->img,
-                'follow_count' => $topic->follow->count() + 9876,
+                'follow_count' => $topic->follow->count() + (int) config('customer.add_topic_follow_count'),
             ];
         }
         return $data;

+ 1 - 1
app/Transformers/Post/DetailTransformer.php

@@ -62,7 +62,7 @@ class DetailTransformer extends TransformerAbstract
             'collect_count' => $post->data->collect_count,
             'comment_count' => $post->data->comment_count,
             'available_bean' => $post->data->available_bean,
-            'will_collect_bean' => $post->data->will_collect_bean,
+            '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,

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

@@ -82,7 +82,7 @@ class SuggestTransformer extends TransformerAbstract
             'praise_count' => $post->data->praise_count,
             'comment_count' => $post->data->comment_count,
             'collect_count' => $post->data->collect_count,
-            'will_collect_bean' => $post->data->will_collect_bean,
+            '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,

+ 1 - 1
app/Transformers/Topic/TopicDetailTransformer.php

@@ -23,7 +23,7 @@ class TopicDetailTransformer extends TransformerAbstract
             'id' => $topic['id'],
             'name' => $topic['name'],
             'img' => $topic['img'],
-            'follow_count' => $topic->follow->count() + 9876,
+            'follow_count' => $topic->follow->count() + (int) config('customer.add_topic_follow_count'),
             'is_follow' => $topic->follow->where('uid', $this->uid)->count()?1:0,
         ];
     }

+ 1 - 1
app/Transformers/Topic/TopicListTransformer.php

@@ -19,7 +19,7 @@ class TopicListTransformer extends TransformerAbstract
             'id' => $topic['id'],
             'name' => $topic['name'],
             'img' => $topic['img'],
-            'follow_count' => $topic->follow->count() + 9876,
+            'follow_count' => $topic->follow->count() + (int) config('customer.add_topic_follow_count'),
         ];
     }
 }

+ 1 - 1
app/Transformers/Topic/TopicPostTransformer.php

@@ -79,7 +79,7 @@ class TopicPostTransformer extends TransformerAbstract
             'pv' => $post->data->pv,
             'praise_count' => $post->data->praise_count,
             'comment_count' => $post->data->comment_count,
-            'will_collect_bean' => $post->data->will_collect_bean,
+            '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,

+ 1 - 0
config/customer.tpl

@@ -6,4 +6,5 @@ return [
     'app_service_url' => '{app_service_url}',
     'share_post_h5url' => '{share_post_h5url}',
     'share_post_bean' => '{share_post_bean}',
+    'add_topic_follow_count' => '{add_topic_follow_count}',
 ];