api.php 3.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. <?php
  2. /*
  3. |--------------------------------------------------------------------------
  4. | Application Routes
  5. |--------------------------------------------------------------------------
  6. |
  7. | Here is where you can register all of the routes for an application.
  8. | It is a breeze. Simply tell Lumen the URIs it should respond to
  9. | and give it the Closure to call when that URI is requested.
  10. |
  11. */
  12. $api = app('Dingo\Api\Routing\Router');
  13. $api->version('v1', [
  14. 'namespace' => 'App\Http\Controllers\V1',
  15. ], function ($api) {
  16. //根据行为标识查询行为
  17. $api->get('getBehaviorByIdentify', 'BehaviorController@getBehaviorByIdentify');
  18. $api->get('getVodUploadAuth', 'AliYunVodController@getVodUploadAuth');
  19. $api->get('getPlayUrlByVideoId', 'AliYunVodController@getPlayUrlByVideoId');
  20. //获取所有行为
  21. $api->get('getAllBehavior', 'BehaviorController@getAllBehavior');
  22. $api->get('test_aa', 'AliYunVodController@test');
  23. //登录+验签
  24. $api->group(['middleware' => ['chxq_jwt_auth']], function ($api) {
  25. //发布内容
  26. $api->post('post', 'PostController@create');
  27. //个人中心内容
  28. $api->get('post/my', 'PostController@myPost');
  29. //内容列表
  30. $api->get('post', 'PostController@index');
  31. //视频列表
  32. $api->get('post/video', 'PostController@video');
  33. //内容详情
  34. $api->get('post/detail', 'PostController@detail');
  35. //推荐内容
  36. $api->get('post/suggest', 'PostController@suggestPost');
  37. //评价&回复
  38. $api->post('post/comment', 'PostController@comment');
  39. //评价列表
  40. $api->get('post/comment', 'PostController@commentList');
  41. //回复列表
  42. $api->get('post/reply', 'PostController@replyList');
  43. //话题分类
  44. $api->get('topicCategory', 'CategoryController@index');
  45. //获取话题
  46. $api->get('topicCategory/getTopics', 'CategoryController@getTopics');
  47. //话题内容列表
  48. $api->get('post/topic', 'PostController@topicPost');
  49. //话题列表
  50. $api->get('topic', 'PostController@topicList');
  51. //获取话题
  52. $api->get('topic/group', 'PostController@getTopic');
  53. //获取内容视频组
  54. $api->get('post/video/group', 'PostController@getPostVideo');
  55. //话题详情
  56. $api->get('topic/detail', 'PostController@topicDetail');
  57. //关注推荐话题
  58. $api->post('memberFollowTopic', 'MemberFollowTopic@memberFollowTopic');
  59. //关注单个话题
  60. $api->post('memberFollowTopic/follow', 'MemberFollowTopic@followTopic');
  61. //取消关注
  62. $api->delete('memberFollowTopic/cancel', 'MemberFollowTopic@cancelFollowTopic');
  63. //获取用户关注话题
  64. $api->get('memberFollowTopic/getMemberTopic', 'MemberFollowTopic@getMemberTopics');
  65. //关注话题列表
  66. $api->get('memberFollowTopic', 'MemberFollowTopic@index');
  67. //收藏列表
  68. $api->get('postCollect', 'PostCollectController@index');
  69. //优秀居民信息获取
  70. $api->get('excellentResidents', 'BeanDetailController@excellentResidents');
  71. //排行榜
  72. $api->get('rankingList', 'BeanDetailController@rankingList');
  73. //星球首页
  74. $api->get('starHome', 'BeanDetailController@starHome');
  75. //用户发布数,收藏数,转发数
  76. $api->get('post/memberPostStatistics', 'PostController@memberPostStatistics');
  77. //关注feed流
  78. $api->get('feed', 'FeedController@index');
  79. });
  80. });