Browse Source

Merge branch 'develop'

durong 5 years ago
parent
commit
7143a668c5

+ 1 - 0
app/Http/Controllers/V1/PostController.php

@@ -239,6 +239,7 @@ class PostController extends Controller
      */
     public function detail(Request $request)
     {
+        Log::debug("内容详情-参数".json_encode($request));
         $validator = Validator::make($request->all(), [
             'id' => 'required|integer',
         ]);

+ 1 - 0
app/Repositories/CategoryRepository.php

@@ -35,6 +35,7 @@ class CategoryRepository {
             ->where('topic.is_suggest',1)
             ->whereIn('category_topic.category_id',$ids)
             ->select('topic.id','topic.name','topic.is_suggest')
+            ->groupBy('topic.id')
             ->get();
     }
 }

+ 1 - 1
app/Repositories/PostRepositories.php

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

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

@@ -23,7 +23,7 @@ class TopicDetailTransformer extends TransformerAbstract
             'id' => $topic['id'],
             'name' => subtext($topic['name'], 5),
             'img' => $topic['img'],
-            'follow_count' => getNumber($topic->follow->count() + config('customer.add_topic_follow_count')),
+            'follow_count' => getNumber($topic->follow->count() + $topic['base_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' => subtext($topic['name'], 5),
             'img' => $topic['img'],
-            'follow_count' => getNumber($topic->follow->count() + config('customer.add_topic_follow_count')),
+            'follow_count' => getNumber($topic->follow->count() + $topic['base_count']),
         ];
     }
 }

+ 0 - 1
config/customer.tpl

@@ -6,5 +6,4 @@ 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}',
 ];

File diff suppressed because it is too large
+ 1 - 1
resources/views/post/detail.php


+ 7 - 7
routes/api.php

@@ -96,14 +96,14 @@ $api->version('v1', [
         //关注feed流
         $api->get('feed', 'FeedController@index');
 
-        //优秀居民信息获取
-        $api->get('excellentResidents', 'BeanDetailController@excellentResidents');
-        //排行榜
-        $api->get('rankingList', 'BeanDetailController@rankingList');
-        //星球首页
-        $api->get('starHome', 'BeanDetailController@starHome');
-    });
 
+    });
+    //优秀居民信息获取
+    $api->get('excellentResidents', 'BeanDetailController@excellentResidents');
+    //排行榜
+    $api->get('rankingList', 'BeanDetailController@rankingList');
+    //星球首页
+    $api->get('starHome', 'BeanDetailController@starHome');
     //分享/邀请首页
     $api->get('starDetail', 'BeanDetailController@starDetail');