api.php 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  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('vod/upload/image', 'AliYunVodController@getImgUploadAuth');
  20. $api->get('getPlayUrlByVideoId', 'AliYunVodController@getPlayUrlByVideoId');
  21. //获取所有行为
  22. $api->get('getAllBehavior', 'BehaviorController@getAllBehavior');
  23. $api->group(['middleware' => ['chxq_sign']], function ($api) {
  24. //查询帖子内容详情
  25. $api->get('post/info', 'PostController@find');
  26. });
  27. //登录
  28. $api->group(['middleware' => ['chxq_jwt_auth']], function ($api) {
  29. //内容详情
  30. $api->get('post/detail', 'PostController@detail');
  31. //获取热门分类下音乐列表
  32. $api->get('musicList', 'MusicListController@index');
  33. //音乐分类列表
  34. $api->get('category/list', 'MusicListController@categoryList');
  35. //获取某分类下所有音乐
  36. $api->get('music', 'MusicListController@postMusicList');
  37. //用户上传音乐
  38. $api->post('music/upload', 'MusicListController@addMusic');
  39. });
  40. $api->get('post/suggest2', 'PostController@suggestPost');
  41. //登录+验签
  42. $api->group(['middleware' => ['chxq_jwt_auth','chxq_sign']], function ($api) {
  43. //发布内容
  44. $api->post('post', 'PostController@create');
  45. //删除内容
  46. $api->delete('post', 'PostController@delete');
  47. //个人中心内容
  48. $api->get('post/my', 'PostController@myPost');
  49. //内容列表
  50. $api->get('post', 'PostController@index');
  51. //视频列表
  52. $api->get('post/video', 'PostController@video');
  53. //推荐内容
  54. $api->get('post/suggest', 'PostController@suggestPost');
  55. //评价&回复
  56. $api->post('post/comment', 'PostController@comment');
  57. //评价列表
  58. $api->get('post/comment', 'PostController@commentList');
  59. //回复列表
  60. $api->get('post/reply', 'PostController@replyList');
  61. //话题分类
  62. $api->get('topicCategory', 'CategoryController@index');
  63. //获取话题
  64. $api->get('topicCategory/getTopics', 'CategoryController@getTopics');
  65. //获取话题
  66. $api->get('topic/group', 'PostController@getTopic');
  67. //话题内容列表
  68. $api->get('post/topic', 'PostController@topicPost');
  69. //话题列表
  70. $api->get('topic', 'PostController@topicList');
  71. //获取内容视频组
  72. $api->get('post/video/group', 'PostController@getPostVideo');
  73. //话题详情
  74. $api->get('topic/detail', 'PostController@topicDetail');
  75. //关注推荐话题
  76. $api->post('memberFollowTopic', 'MemberFollowTopic@memberFollowTopic');
  77. //关注单个话题
  78. $api->post('memberFollowTopic/follow', 'MemberFollowTopic@followTopic');
  79. //取消关注
  80. $api->delete('memberFollowTopic/cancel', 'MemberFollowTopic@cancelFollowTopic');
  81. //获取用户关注话题
  82. $api->get('memberFollowTopic/getMemberTopic', 'MemberFollowTopic@getMemberTopics');
  83. //关注话题列表
  84. $api->get('memberFollowTopic', 'MemberFollowTopic@index');
  85. //收藏列表
  86. $api->get('postCollect', 'PostCollectController@index');
  87. //用户发布数,收藏数,转发数
  88. $api->get('post/memberPostStatistics', 'PostController@memberPostStatistics');
  89. //关注feed流
  90. $api->get('feed', 'FeedController@index');
  91. //优秀居民信息获取
  92. $api->get('excellentResidents', 'BeanDetailController@excellentResidents');
  93. //排行榜
  94. $api->get('rankingList', 'BeanDetailController@rankingList');
  95. //星球首页
  96. $api->get('starHome', 'BeanDetailController@starHome');
  97. });
  98. //分享/邀请首页
  99. $api->get('starDetail', 'BeanDetailController@starDetail');
  100. });