api.php 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106
  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. //生成swagger.json文件
  18. Route::get("/swagger","BaseController@swagger");
  19. //读取swagger内容
  20. Route::get("/loadswagger","BaseController@loadSwagger");
  21. //测试
  22. Route::get("/test","BaseController@test");
  23. //校验微信服务器
  24. Route::any("/checkServer/{code}","WechatController@checkServer");
  25. //设置微信菜单
  26. Route::get("/wechat/setmenu","WechatController@setMenu");
  27. //获取微信
  28. Route::get("/wechat/account/config","WechatController@accountConfig");
  29. //微信公众号授权回调
  30. Route::any("wechat/account/callback","WechatController@accountCallback");
  31. //定时任务
  32. Route::prefix("cron")->namespace("Cron")->group(function (){
  33. //获取美团订单
  34. Route::get("meituan/orders","CronController@meituanOrders");
  35. //获取聚推客订单
  36. Route::get("jutuike/orders","CronController@jutuikeOrders");
  37. //获取拼多多订单
  38. Route::get("pdd/orders","CronController@pddOrders");
  39. //下单提醒
  40. Route::get("send/order/template","CronController@sendOrderTemplate");
  41. //定时结算佣金
  42. Route::get("settlement/order","CronController@settlementOrderCommission");
  43. });
  44. //用户管理
  45. Route::prefix("user")->namespace("User")->middleware(["checkAuth"])->group(function (){
  46. //获取用户信息接口
  47. Route::get("info","UserController@getUserInfo");
  48. //获取用户粉丝
  49. Route::get("fans/list","UserController@getFansList");
  50. //收支明细列表
  51. Route::get("fianance/list","UserController@getFinanceList");
  52. //流水详情
  53. Route::get("fianance/detail","UserController@getFinanceDetail");
  54. //用户提现
  55. Route::post("cash","UserController@getCash");
  56. //获取用户推广二维码
  57. Route::get("recommend/url","UserController@getRecommendUrl");
  58. });
  59. //订单管理
  60. Route::prefix("order")->namespace("Order")->middleware(["checkAuth"])->group(function (){
  61. //获取订单列表接口
  62. Route::get("list","OrderController@getOrderList");
  63. //获取订单类型接口
  64. Route::get("type/list","OrderController@getOrderTypeList");
  65. //订单详情接口
  66. Route::get("detail","OrderController@getOrderDetail");
  67. });
  68. //首页省钱
  69. Route::prefix("home")->namespace("Home")->middleware(["checkAuth"])->group(function (){
  70. //获取省钱列表接口
  71. Route::get("list","HomeController@getHomeList");
  72. //返钱赚钱接口
  73. Route::get("commission/list","HomeController@getCommissionList");
  74. });
  75. //拼多多导购相关接口
  76. Route::prefix("pdd")->namespace("Pdd")->middleware(["checkAuth"])->group(function (){
  77. //获取商品类目接口
  78. Route::get("cate/list","PddController@getCateList");
  79. //商品列表
  80. Route::get("goods/list","PddController@getGoodsList");
  81. //获取商品推广链接
  82. Route::get("goods/recommendurl","PddController@getGoodsRecommendUrl");
  83. });
  84. //电商相关接口
  85. Route::prefix("buy")->namespace("Buy")->middleware(["checkAuth"])->group(function (){
  86. });