api.php 3.8 KB

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