version('v1', [ 'namespace' => 'App\Http\Controllers\V1', ], function ($api) { //根据行为标识查询行为 $api->get('getBehaviorByIdentify', 'BehaviorController@getBehaviorByIdentify'); //登录+验签 $api->group(['middleware' => ['chxq_jwt_auth']], function ($api) { //发布内容 $api->post('post', 'PostController@create'); //个人中心内容 $api->get('post/my', 'PostController@myPost'); //内容列表 $api->get('post', 'PostController@index'); //视频列表 $api->get('post/video', 'PostController@video'); //内容详情 $api->get('post/detail', 'PostController@detail'); //推荐内容 $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('post/topic', 'PostController@topicPost'); //话题列表 $api->get('topic', 'PostController@topicList'); //话题详情 $api->get('topic/detail', 'PostController@topicDetail'); //关注推荐话题 $api->post('memberFollowTopic', 'MemberFollowTopic@memberFollowTopic'); //关注单个话题 $api->post('memberFollowTopic/follow', 'MemberFollowTopic@followTopic'); //取消关注 $api->delete('memberFollowTopic/cancel', 'MemberFollowTopic@cancelFollowTopic'); //关注话题列表 $api->get('memberFollowTopic', 'MemberFollowTopic@index'); //收藏列表 $api->get('postCollect', 'PostCollectController@index'); }); });