抖音小程序

api.php 3.8KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  1. <?php
  2. use Illuminate\Http\Request;
  3. use Illuminate\Support\Facades\Route;
  4. /*
  5. |--------------------------------------------------------------------------
  6. | API Routes
  7. |--------------------------------------------------------------------------
  8. |
  9. | Here is where you can register API routes for your application. These
  10. | routes are loaded by the RouteServiceProvider within a group which
  11. | is assigned the "api" middleware group. Enjoy building your API!
  12. |
  13. */
  14. Route::middleware('auth:api')->get('/user', function (Request $request) {
  15. return $request->user();
  16. });
  17. Route::get('/token/test', 'Api\TestController@getToken');
  18. Route::get('/getVideoStatus', 'Api\TestController@getVideoStatus');
  19. Route::get('/getAlbumStatus', 'Api\TestController@getAlbumStatus');
  20. # 小程序用户登录
  21. Route::post('/users/loginCode', 'Api\UserController@loginCode');
  22. # 小程序发送验证码
  23. Route::post('/users/sendMobileCode', 'Api\UserController@sendMobileCode');
  24. # 小程序验证码登录
  25. Route::post('/users/loginMobileCode', 'Api\UserController@loginMobileCode');
  26. Route::group(['namespace' => 'Api'], function() {
  27. # 素材内容相关
  28. Route::group(['prefix' => 'material'], function(){
  29. # 上传素材
  30. Route::post('upload', 'MaterialController@upload');
  31. # 素材列表
  32. Route::get('list', 'MaterialController@list');
  33. });
  34. # 内容库管理
  35. Route::group(['prefix' => 'albumManage'], function(){
  36. # 创建短剧
  37. Route::post('createAlbum', 'AlbumManageController@createAlbum');
  38. # 编辑短剧/添加剧集
  39. Route::post('editAlbum', 'AlbumManageController@editAlbum');
  40. # 短剧列表
  41. Route::get('albumList', 'AlbumManageController@albumList');
  42. # 短剧详情
  43. Route::get('albumDetail', 'AlbumManageController@albumDetail');
  44. # 短剧授权
  45. Route::post('albumAuth', 'AlbumManageController@albumAuth');
  46. # 页面绑定
  47. Route::post('bindPage', 'AlbumManageController@bindPage');
  48. # 短剧送审
  49. Route::post('albumToExamine', 'AlbumManageController@albumToExamine');
  50. # 短剧上线
  51. Route::post('albumOnline', 'AlbumManageController@albumOnline');
  52. # 查询审核结果
  53. Route::post('albumFetch', 'AlbumManageController@albumFetch');
  54. });
  55. # 广告管理
  56. Route::group(['prefix' => 'adManage'], function(){
  57. # 广告位列表
  58. Route::get('adList', 'AdManageController@adList');
  59. # 新增广告位
  60. Route::post('adCreate', 'AdManageController@adCreate');
  61. # 变更广告位状态
  62. Route::post('updateAdStatus', 'AdManageController@updateAdStatus');
  63. });
  64. # 短剧
  65. Route::group(['prefix' => 'album'], function(){
  66. # 短剧列表
  67. Route::get('albumList', 'AlbumController@albumList');
  68. # 短剧详情
  69. Route::get('albumDetail', 'AlbumController@albumDetail');
  70. });
  71. # 小程序用户
  72. Route::group(['prefix' => 'users'], function() {
  73. # 收藏浏览列表
  74. Route::get('likeList', 'UserController@likeList');
  75. # 收藏浏览数据上报
  76. Route::post('like', 'UserController@like');
  77. # 用户观看广告数据上报
  78. Route::post('watchAd', 'UserController@watchAd');
  79. # 保存抖音授权后的用户信息
  80. Route::post('userProfile', 'UserController@userProfile');
  81. });
  82. # IM客服
  83. Route::group(['prefix' => 'customerService'], function(){
  84. Route::post('getService', 'CustomerServiceController@getCustomerService');
  85. });
  86. # 广告
  87. Route::group(['prefix' => 'ad'], function() {
  88. # 获取广告位ID
  89. Route::get('getAdPlacement', 'AdController@getAdPlacement');
  90. });
  91. # 异常
  92. Route::group(['prefix' => 'exception'], function() {
  93. # 异常数据上报
  94. Route::post('report', 'ExceptionController@report');
  95. });
  96. });