Explorar o código

Merge branch 'develop'

caihongxingqiu %!s(int64=5) %!d(string=hai) anos
pai
achega
4a0ee40cc5

+ 34 - 3
.rocketeer/config.php

@@ -30,14 +30,14 @@ return [
     ////////////////////////////////////////////////////////////////////
 
     // The default remote connection(s) to execute tasks on
-    'default'          => ['production'],
+    'default'          => ['beta'],
 
     // The various connections you defined
     // You can leave all of this empty or remove it entirely if you don't want
     // to track files with credentials : Rocketeer will prompt you for your credentials
     // and store them locally
     'connections'      => [
-        'production' => [
+        'beta' => [
             'host'      => '47.92.174.125:2345',
             'username'  => 'root',
             'password'  => '',
@@ -46,6 +46,28 @@ return [
             'agent'     => '',
             'db_role'   => true,
         ],
+        'production'    => [
+            'servers'   => [
+                [
+                    'host'      => '47.92.131.85:2345',
+                    'username'  => 'root',
+                    'password'  => '',
+                    'key'       => '/root/.ssh/id_rsa',
+                    'keyphrase' => '',
+                    'agent'     => '',
+                    'db_role'   => true,
+                ],
+                [
+                    'host'      => '47.92.30.243:2345',
+                    'username'  => 'root',
+                    'password'  => '',
+                    'key'       => '/root/.ssh/id_rsa',
+                    'keyphrase' => '',
+                    'agent'     => '',
+                    'db_role'   => true,
+                ]
+            ]
+        ],
     ],
 
     /*
@@ -77,7 +99,16 @@ return [
         // Stages configurations
         'stages'      => [],
         // Connections configuration
-        'connections' => [],
+        'connections' => [
+            'production'    => [
+                'remote'    => [
+                    'root_directory'    => '/data/wwwroot/uptoyo/api'
+                ],
+                'scm'   => [
+                    'branch'    => 'release'
+                ]
+            ]
+        ],
 
     ],
 

+ 12 - 9
app/Helper/helper.php

@@ -171,15 +171,18 @@ function success($data = [], $msg = "成功")
     return $response;
 }
 //转换数字
-function getNumber($num) {
-    if ($num >= 100000000) {
-        $num = sprintf("%.2f", $num / 100000000) . '亿';
-    } elseif ($num >= 100000) {
-        $num = intval($num / 10000) . '万';
-    } elseif ($num >= 10000) {
-        $num = sprintf("%.1f", $num / 10000) . '万';
+function getNumber($number)
+{
+    if (empty($number) || !is_numeric($number)) return (string)intval($number);
+    $unit = "";
+    if ($number >= 10000) {
+        $leftNumber = floor($number / 10000);
+        $rightNumber = bcmul(($number % 10000) / 10000, '1', 1);
+        $number = floatval($leftNumber + $rightNumber);
+        $unit = "w";
     } else {
-        $num = strval($num);
+        $decimals = $number > 1 ? 2 : 6;
+        $number = (float)number_format($number, $decimals, '.', '');
     }
-    return $num;
+    return (string)$number . $unit;
 }

+ 12 - 1
app/Http/Controllers/V1/BeanDetailController.php

@@ -50,7 +50,7 @@ class BeanDetailController extends Controller
         }
     }
 
-    //星球首页
+    //后院首页
     public function starHome(Request $request)
     {
         $star_home = $this->beanRepository->starHome($request->all());
@@ -60,4 +60,15 @@ class BeanDetailController extends Controller
             return $this->jsonSuccess();
         }
     }
+
+    //不登录单独返回每日新闻、小贴士
+    public function lists(Request $request)
+    {
+        $star_lists = $this->beanRepository->lists($request->all());
+        if ($star_lists){
+            return $this->jsonSuccess($star_lists);
+        }else{
+            return $this->jsonSuccess();
+        }
+    }
 }

+ 42 - 26
app/Http/Controllers/V1/PostController.php

@@ -88,13 +88,16 @@ class PostController extends Controller
     {
         Log::debug('内容搜索' . json_encode($request));
         $userInfo = $this->getUserInfo();
-        if (empty($userInfo)) {
-            Log::debug('获取用户信息失败index'.json_encode($request));
-            return jsonError('获取用户信息失败');
+        if ($userInfo) {
+            $uid = $userInfo['uid'];
+            $inviteCode = $userInfo['invite_code'];
+        }else{
+            $uid = 0;
+            $inviteCode = '';
         }
         $list = $this->postRepositories->lists($request->all());
         $fractal = new Manager();
-        $resource = new Collection($list, new ListTransformer($userInfo['uid'], $userInfo['invite_code']));
+        $resource = new Collection($list, new ListTransformer($uid, $inviteCode));
         $resource->setPaginator(new IlluminatePaginatorAdapter($list));
         $data = $fractal->createData($resource)->toArray();
 
@@ -107,13 +110,16 @@ class PostController extends Controller
     public function video(Request $request)
     {
         $userInfo = $this->getUserInfo();
-        if (empty($userInfo)) {
-            Log::debug('获取用户信息失败video'.json_encode($request));
-            return jsonError('获取用户信息失败');
+        if ($userInfo) {
+            $uid = $userInfo['uid'];
+            $inviteCode = $userInfo['invite_code'];
+        }else{
+            $uid = 0;
+            $inviteCode = '';
         }
         $list = $this->postRepositories->video($request->all());
         $fractal = new Manager();
-        $resource = new Collection($list, new VideoTransformer($userInfo['uid'], $userInfo['invite_code']));
+        $resource = new Collection($list, new VideoTransformer($uid, $inviteCode));
         $resource->setPaginator(new IlluminatePaginatorAdapter($list));
         $data = $fractal->createData($resource)->toArray();
 
@@ -159,15 +165,18 @@ class PostController extends Controller
     public function suggestPost(Request $request)
     {
         $userInfo = $this->getUserInfo();
-        if (empty($userInfo)) {
-            Log::debug('获取用户信息失败suggestPost'.json_encode($request));
-            return jsonError('获取用户信息失败');
+        if ($userInfo) {
+            $uid = $userInfo['uid'];
+            $inviteCode = $userInfo['invite_code'];
+        }else{
+            $uid = 0;
+            $inviteCode = '';
         }
 
         $param = $request->all();
         $list = $this->postRepositories->suggestPost($param);
         $fractal = new Manager();
-        $resource = new Collection($list, new SuggestTransformer($userInfo['uid'], $userInfo['invite_code']));
+        $resource = new Collection($list, new SuggestTransformer($uid, $inviteCode));
         $resource->setPaginator(new IlluminatePaginatorAdapter($list));
         $data = $fractal->createData($resource)->toArray();
 
@@ -184,7 +193,6 @@ class PostController extends Controller
             } else {
                 $floor = json_decode($floor, true);
             }
-
             if ($floor) {
                 $newData = [];
                 foreach ($data['data'] as $key => $val) {
@@ -210,7 +218,8 @@ class PostController extends Controller
                         } elseif ($floor[$key + 1]['show_type'] == 'user') {
                             $userData = [];
                             foreach ($floor[$key + 1]['data'] as $item) {
-                                $userData[] = array_merge($item, ['follow_status' => $this->getFollowStatus($userInfo['uid'], $item['uid'])]);
+                                $followStatus = $uid ? $this->getFollowStatus($userInfo['uid'], $item['uid']) : 0;
+                                $userData[] = array_merge($item, ['follow_status' => $followStatus]);
                             }
                             if ($userData) {
                                 $newData[] = [
@@ -251,16 +260,19 @@ class PostController extends Controller
             return jsonError($validator->errors()->first());
         }
         $userInfo = $this->getUserInfo();
-        if (empty($userInfo)) {
-            Log::debug('获取用户信息失败detail'.json_encode($request));
-            return jsonError('获取用户信息失败');
+        if ($userInfo) {
+            $uid = $userInfo['uid'];
+            $inviteCode = $userInfo['invite_code'];
+        }else{
+            $uid = 0;
+            $inviteCode = '';
         }
         $detail = $this->postRepositories->detail($request['id']);
         if (!$detail) {
             return jsonError('内容飞走了');
         }
         $fractal = new Manager();
-        $res = new Item($detail, new DetailTransformer($userInfo['uid'], $userInfo['invite_code']));
+        $res = new Item($detail, new DetailTransformer($uid, $inviteCode));
         $data = $fractal->createData($res)->toArray();
 
         return jsonSuccess($data);
@@ -339,16 +351,17 @@ class PostController extends Controller
             return jsonError($validator->errors()->first());
         }
         $userInfo = $this->getUserInfo();
-        if (empty($userInfo)) {
-            Log::debug('获取用户信息失败topicDetail'.json_encode($request));
-            return jsonError('获取用户信息失败');
+        if ($userInfo) {
+            $uid = $userInfo['uid'];
+        }else{
+            $uid = 0;
         }
         $detail = $this->postRepositories->topicDetail($request['id']);
         if (!$detail) {
             return jsonError('获取话题信息失败');
         }
         $fractal = new Manager();
-        $res = new Item($detail, new TopicDetailTransformer($userInfo['uid']));
+        $res = new Item($detail, new TopicDetailTransformer($uid));
         $data = $fractal->createData($res)->toArray();
 
         return jsonSuccess($data);
@@ -360,13 +373,16 @@ class PostController extends Controller
     public function topicPost(Request $request)
     {
         $userInfo = $this->getUserInfo();
-        if (empty($userInfo)) {
-            Log::debug('获取用户信息失败topicPost'.json_encode($request));
-            return jsonError('获取用户信息失败');
+        if ($userInfo) {
+            $uid = $userInfo['uid'];
+            $inviteCode = $userInfo['invite_code'];
+        }else{
+            $uid = 0;
+            $inviteCode = '';
         }
         $list = $this->postRepositories->topicPost($request->all());
         $fractal = new Manager();
-        $resource = new Collection($list, new TopicPostTransformer($userInfo['uid'], $userInfo['invite_code']));
+        $resource = new Collection($list, new TopicPostTransformer($uid, $inviteCode));
         $resource->setPaginator(new IlluminatePaginatorAdapter($list));
         $data = $fractal->createData($resource)->toArray();
 

+ 23 - 5
app/Repositories/BeanRepository.php

@@ -155,7 +155,7 @@ class BeanRepository
 
     }
 
-    //星球首页
+    //后院首页
     public function starHome($request)
     {
         $today = Carbon::now()->toDateString();
@@ -173,8 +173,8 @@ class BeanRepository
         $my_bean = $this->get_user_bean($uid);
         $star_home['mybean']['user_all_bean'] = intval($my_bean['user_all_bean']) ?? 0;//用户总U米
         $star_home['mybean']['today_add_bean'] = intval($bean) ?? 0;//今日发放U米
-        $star_home['mybean']['user_count'] = intval($user_bean['user_count']) ?? 0;//已入驻居民
-        $star_home['mybean']['yesterday_add_user'] = intval($user_bean['yesterday_add_user']) ?? 0;//昨日新增居民
+        $star_home['mybean']['user_count'] = intval($user_bean['user_count']) ?? 0;//已入驻老板
+        $star_home['mybean']['yesterday_add_user'] = intval($user_bean['yesterday_add_user']) ?? 0;//昨日新增老板
         $star_home['mybean']['yesterday_quantity_issued'] = intval($yesterday_quantity_issued) ?? 0;//昨日发放总U米
 
         $star_home['excellent_residents'] = $this->excellentResidents($request) ?? [];
@@ -277,8 +277,8 @@ class BeanRepository
             return jsonError('邀请码有误');
         }
 
-        $star_detail['mybean']['user_count'] = intval($user_bean['user_count']) ?? 0;//已入驻居民
-        $star_detail['mybean']['yesterday_add_user'] = intval($user_bean['yesterday_add_user']) ?? 0;//昨日新增居民
+        $star_detail['mybean']['user_count'] = intval($user_bean['user_count']) ?? 0;//已入驻老板
+        $star_detail['mybean']['yesterday_add_user'] = intval($user_bean['yesterday_add_user']) ?? 0;//昨日新增老板
         $star_detail['mybean']['yesterday_quantity_issued'] = intval($yesterday_quantity_issued) ?? 0;//昨日发放总U米
 
         $star_detail['daily_news'] = $this->getNews($request);
@@ -304,4 +304,22 @@ class BeanRepository
 
     }
 
+    //不登录单独返回每日新闻、小贴士
+    public function lists($request)
+    {
+        $star_lists = [];
+        $user_bean = Redis::get('my_bean');
+        $user_bean = json_decode($user_bean,true);
+        $yesterday_quantity_issued = Redis::get('yesterday_quantity_issued');
+        Log::debug($user_bean);
+        Log::debug($yesterday_quantity_issued);
+        $star_lists['mybean']['user_count'] = intval($user_bean['user_count']) ?? 0;//已入驻老板
+        $star_lists['mybean']['yesterday_add_user'] = intval($user_bean['yesterday_add_user']) ?? 0;//昨日新增老板
+        $star_lists['mybean']['yesterday_quantity_issued'] = intval($yesterday_quantity_issued) ?? 0;//昨日发放总U米
+        $star_lists['daily_news'] = $this->getNews($request);
+        $star_lists['tips'] = $this->getPlatformContent($id = 1);
+
+        return $star_lists;
+    }
+
 }

+ 1 - 1
app/Repositories/FeedRepositories.php

@@ -215,7 +215,7 @@ class FeedRepositories
             'img' => $post['img'],
             'imgs' => $imgs,
             'video' => $post['video'],
-            'pv' => $post->data->pv,
+            'pv' => getNumber($post->data->pv),
             'praise_count' => $post->data->praise_count,
             'comment_count' => $post->data->comment_count,
             'available_bean' => $post->data->available_bean,

+ 16 - 7
app/Transformers/Post/DetailTransformer.php

@@ -38,10 +38,19 @@ class DetailTransformer extends TransformerAbstract
                 'name' => $val
             ];
         }
+
+        $isLike = 0;
+        $isDislike = 0;
+        $isCollect = 0;
         $isFollow = 0;
-        $followStatus = $this->getFollowStatus($this->uid, $post['uid']);
-        if($followStatus){
-            $isFollow = $followStatus;
+        if($this->uid){
+            $isLike = PostLike::where('post_id', $post['id'])->where('uid', $this->uid)->exists()?1:0;
+            $isDislike = PostDislike::where('post_id', $post['id'])->where('uid', $this->uid)->exists()?1:0;
+            $isCollect = PostCollect::where('post_id', $post['id'])->where('uid', $this->uid)->exists()?1:0;
+            $followStatus = $this->getFollowStatus($this->uid, $post['uid']);
+            if($followStatus){
+                $isFollow = $followStatus;
+            }
         }
         return [
             'id' => $post['id'],
@@ -58,15 +67,15 @@ class DetailTransformer extends TransformerAbstract
             'img' => $post['img'],
             'imgs' => $imgs,
             'video' => $post['video'],
-            'pv' => $post->data->pv,
+            'pv' => getNumber($post->data->pv),
             'praise_count' => $post->data->praise_count,
             '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 + 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' => $isLike,
+            'is_dislike' => $isDislike,
+            'is_collect' => $isCollect,
             'is_follow' => $isFollow,
             'h5url' => config('customer.share_post_h5url')."?post_id={$post['id']}&invite_code={$this->invite_code}",
             'desc_url' => $post['type'] == 'html'?config('customer.app_service_url').'/community/fragment/detail/'.$post['id']:'',

+ 5 - 1
app/Transformers/Post/ListTransformer.php

@@ -20,6 +20,10 @@ class ListTransformer extends TransformerAbstract
     }
     public function transform(Post $post)
     {
+        $isLike = 0;
+        if($this->uid){
+            $isLike = PostLike::where('post_id', $post['id'])->where('uid', $this->uid)->exists()?1:0;
+        }
         return [
             'id' => $post['id'],
             'type' => $post['type'],
@@ -30,7 +34,7 @@ class ListTransformer extends TransformerAbstract
             'content' => subtext($post['content'], 100),
             'img' => $post['img'],
             'praise_count' => $post->data->praise_count,
-            'is_like' => PostLike::where('post_id', $post['id'])->where('uid', $this->uid)->exists()?1:0,
+            'is_like' => $isLike,
             'h5url' => config('customer.share_post_h5url')."?post_id={$post['id']}&invite_code={$this->invite_code}",
             'desc_url' => $post['type'] == 'html'?config('customer.app_service_url').'/community/fragment/detail/'.$post['id']:'',
         ];

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

@@ -49,7 +49,7 @@ class PostTransformer extends TransformerAbstract
             'img' => $post['img'],
             'imgs' => $imgs,
             'video' => $post['video'],
-            'pv' => $post->data->pv,
+            'pv' => getNumber($post->data->pv),
             'praise_count' => $post->data->praise_count,
             'collect_count' => $post->data->collect_count,
             'comment_count' => $post->data->comment_count,

+ 12 - 4
app/Transformers/Post/SuggestTransformer.php

@@ -47,6 +47,14 @@ class SuggestTransformer extends TransformerAbstract
                 'name' => $val
             ];
         }
+        $isLike = 0;
+        $isDislike = 0;
+        $isCollect = 0;
+        if($this->uid){
+            $isLike = PostLike::where('post_id', $post['id'])->where('uid', $this->uid)->exists()?1:0;
+            $isDislike = PostDislike::where('post_id', $post['id'])->where('uid', $this->uid)->exists()?1:0;
+            $isCollect = PostCollect::where('post_id', $post['id'])->where('uid', $this->uid)->exists()?1:0;
+        }
         return [
             'show_type' => 'post',
             'id' => $post['id'],
@@ -62,14 +70,14 @@ class SuggestTransformer extends TransformerAbstract
             'img' => $post['img'],
             'imgs' => $imgs,
             'video' => $post['video'],
-            'pv' => $post->data->pv,
+            'pv' => getNumber($post->data->pv),
             '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 + 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' => $isLike,
+            'is_dislike' => $isDislike,
+            'is_collect' => $isCollect,
             'comment' => $comment,
             'is_follow' => $this->getFollowStatus($this->uid, $post['uid']),
             'h5url' => config('customer.share_post_h5url')."?post_id={$post['id']}&invite_code={$this->invite_code}",

+ 11 - 5
app/Transformers/Post/VideoTransformer.php

@@ -23,10 +23,16 @@ class VideoTransformer extends TransformerAbstract
     }
     public function transform(Post $post)
     {
+        $isLike = 0;
+        $isCollect = 0;
         $isFollow = 0;
-        $followStatus = $this->getFollowStatus($this->uid, $post['uid']);
-        if($followStatus){
-            $isFollow = $followStatus;
+        if($this->uid){
+            $isLike = PostLike::where('post_id', $post['id'])->where('uid', $this->uid)->exists()?1:0;
+            $isCollect = PostCollect::where('post_id', $post['id'])->where('uid', $this->uid)->exists()?1:0;
+            $followStatus = $this->getFollowStatus($this->uid, $post['uid']);
+            if($followStatus){
+                $isFollow = $followStatus;
+            }
         }
         $topic = [];
         foreach($post->topic() as $key => $val){
@@ -50,8 +56,8 @@ class VideoTransformer extends TransformerAbstract
             '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_like' => $isLike,
+            'is_collect' => $isCollect,
             'is_follow' => $isFollow,
             'h5url' => config('customer.share_post_h5url')."?post_id={$post['id']}&invite_code={$this->invite_code}",
             'desc_url' => $post['type'] == 'html'?config('customer.app_service_url').'/community/fragment/detail/'.$post['id']:'',

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

@@ -19,12 +19,16 @@ class TopicDetailTransformer extends TransformerAbstract
     }
     public function transform(Topic $topic)
     {
+        $isFollow = 0;
+        if($this->uid){
+            $isFollow = $topic->follow->where('uid', $this->uid)->count()?1:0;
+        }
         return [
             'id' => $topic['id'],
             'name' => $topic['name'],
             'img' => $topic['img'],
             'follow_count' => getNumber($topic->follow->count() + $topic['base_count']),
-            'is_follow' => $topic->follow->where('uid', $this->uid)->count()?1:0,
+            'is_follow' => $isFollow,
         ];
     }
 }

+ 15 - 7
app/Transformers/Topic/TopicPostTransformer.php

@@ -58,10 +58,18 @@ class TopicPostTransformer extends TransformerAbstract
                 'name' => $val
             ];
         }
+        $isLike = 0;
+        $isDislike = 0;
+        $isCollect = 0;
         $isFollow = 0;
-        $followStatus = $this->getFollowStatus($this->uid, $post['uid']);
-        if($followStatus){
-            $isFollow = $followStatus;
+        if($this->uid){
+            $isLike = PostLike::where('post_id', $post['id'])->where('uid', $this->uid)->exists()?1:0;
+            $isDislike = PostDislike::where('post_id', $post['id'])->where('uid', $this->uid)->exists()?1:0;
+            $isCollect = PostCollect::where('post_id', $post['id'])->where('uid', $this->uid)->exists()?1:0;
+            $followStatus = $this->getFollowStatus($this->uid, $post['uid']);
+            if($followStatus){
+                $isFollow = $followStatus;
+            }
         }
         return [
             'id' => $post['id'],
@@ -77,13 +85,13 @@ class TopicPostTransformer extends TransformerAbstract
             'img' => $post['img'],
             'imgs' => $imgs,
             'video' => $post['video'],
-            'pv' => $post->data->pv,
+            'pv' => getNumber($post->data->pv),
             'praise_count' => $post->data->praise_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_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' => $isLike,
+            'is_dislike' => $isDislike,
+            'is_collect' => $isCollect,
             'comment' => $comment,
             'is_follow' => $isFollow,
             'h5url' => config('customer.share_post_h5url')."?post_id={$post['id']}&invite_code={$this->invite_code}",

+ 21 - 20
routes/api.php

@@ -30,8 +30,6 @@ $api->version('v1', [
     });
     //登录
     $api->group(['middleware' => ['chxq_jwt_auth']], function ($api) {
-        //内容详情
-        $api->get('post/detail', 'PostController@detail');
         //获取热门分类下音乐列表
         $api->get('musicList', 'MusicListController@index');
         //音乐分类列表
@@ -43,7 +41,24 @@ $api->version('v1', [
         $api->post('music/upload', 'MusicListController@addMusic');
 
     });
-    $api->get('post/suggest2', 'PostController@suggestPost');
+
+    //内容列表
+    $api->get('post', 'PostController@index');
+    //视频列表
+    $api->get('post/video', 'PostController@video');
+    //推荐内容
+    $api->get('post/suggest', 'PostController@suggestPost');
+    //内容详情
+    $api->get('post/detail', 'PostController@detail');
+    //话题内容列表
+    $api->get('post/topic', 'PostController@topicPost');
+    //话题详情
+    $api->get('topic/detail', 'PostController@topicDetail');
+    //评价列表
+    $api->get('post/comment', 'PostController@commentList');
+    //回复列表
+    $api->get('post/reply', 'PostController@replyList');
+
     //登录+验签
     $api->group(['middleware' => ['chxq_jwt_auth','chxq_sign']], function ($api) {
         //发布内容
@@ -52,32 +67,18 @@ $api->version('v1', [
         $api->delete('post', 'PostController@delete');
         //个人中心内容
         $api->get('post/my', 'PostController@myPost');
-        //内容列表
-        $api->get('post', 'PostController@index');
-        //视频列表
-        $api->get('post/video', 'PostController@video');
-        //推荐内容
-        $api->get('post/suggest', 'PostController@suggestPost');
         //评价&回复
         $api->post('post/comment', 'PostController@comment');
-        //评价列表
-        $api->get('post/comment', 'PostController@commentList');
-        //回复列表
-        $api->get('post/reply', 'PostController@replyList');
         //话题分类
         $api->get('topicCategory', 'CategoryController@index');
         //获取话题
         $api->get('topicCategory/getTopics', 'CategoryController@getTopics');
         //获取话题
         $api->get('topic/group', 'PostController@getTopic');
-        //话题内容列表
-        $api->get('post/topic', 'PostController@topicPost');
         //话题列表
         $api->get('topic', 'PostController@topicList');
         //获取内容视频组
         $api->get('post/video/group', 'PostController@getPostVideo');
-        //话题详情
-        $api->get('topic/detail', 'PostController@topicDetail');
         //关注推荐话题
         $api->post('memberFollowTopic', 'MemberFollowTopic@memberFollowTopic');
         //关注单个话题
@@ -90,7 +91,6 @@ $api->version('v1', [
         $api->get('memberFollowTopic', 'MemberFollowTopic@index');
         //收藏列表
         $api->get('postCollect', 'PostCollectController@index');
-
         //用户发布数,收藏数,转发数
         $api->get('post/memberPostStatistics', 'PostController@memberPostStatistics');
         //关注feed流
@@ -100,11 +100,12 @@ $api->version('v1', [
         $api->get('excellentResidents', 'BeanDetailController@excellentResidents');
         //排行榜
         $api->get('rankingList', 'BeanDetailController@rankingList');
-        //星球首页
+        //后院首页
         $api->get('starHome', 'BeanDetailController@starHome');
     });
 
     //分享/邀请首页
     $api->get('starDetail', 'BeanDetailController@starDetail');
-
+    //不登录单独返回每日新闻、小贴士
+    $api->get('/starHome/lists', 'BeanDetailController@lists');
 });