1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374 |
- <?php
- /*
- |--------------------------------------------------------------------------
- | Application Routes
- |--------------------------------------------------------------------------
- |
- | Here is where you can register all of the routes for an application.
- | It is a breeze. Simply tell Lumen the URIs it should respond to
- | and give it the Closure to call when that URI is requested.
- |
- */
- $api = app('Dingo\Api\Routing\Router');
- $api->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/group', 'PostController@getTopic');
- //获取内容视频组
- $api->get('post/video/group', 'PostController@getPostVideo');
- //话题详情
- $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/getMemberTopic', 'MemberFollowTopic@getMemberTopics');
- //关注话题列表
- $api->get('memberFollowTopic', 'MemberFollowTopic@index');
- //收藏列表
- $api->get('postCollect', 'PostCollectController@index');
- //用户彩虹豆明细获取
- $api->get('beanDetail', 'BeanDetailController@beanDetail');
- //用户彩虹豆信息获取
- $api->get('getBean', 'BeanDetailController@getBean');
- });
- });
|