api.php 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129
  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::any("transfer/{userId}/{actId}/{type?}","Home\HomeController@getTransferLinkurl");
  33. //定时任务
  34. Route::prefix("cron")->namespace("Cron")->group(function (){
  35. //获取美团订单
  36. Route::get("meituan/orders","CronController@meituanOrders");
  37. //获取聚推客订单
  38. Route::get("jutuike/orders","CronController@jutuikeOrders");
  39. //获取拼多多订单
  40. Route::get("pdd/orders","CronController@pddOrders");
  41. //下单提醒
  42. Route::get("send/order/template","CronController@sendOrderTemplate");
  43. //定时结算佣金
  44. Route::get("settlement/order","CronController@settlementOrderCommission");
  45. //定时处理提现
  46. Route::get("transfer/finance","CronController@transferFinance");
  47. //定时处理打款失败记录
  48. Route::get("callback/cash","CronController@callbackCash");
  49. });
  50. //用户管理
  51. Route::prefix("user")->namespace("User")->middleware(["checkAuth"])->group(function (){
  52. //获取用户信息接口
  53. Route::get("info","UserController@getUserInfo");
  54. //获取用户粉丝
  55. Route::get("fans/list","UserController@getFansList");
  56. //收支明细列表
  57. Route::get("fianance/list","UserController@getFinanceList");
  58. //流水详情
  59. Route::get("fianance/detail","UserController@getFinanceDetail");
  60. //用户提现
  61. Route::post("cash","UserController@getCash");
  62. //获取用户推广二维码
  63. Route::get("recommend/url","UserController@getRecommendUrl");
  64. });
  65. //订单管理
  66. Route::prefix("order")->namespace("Order")->middleware(["checkAuth"])->group(function (){
  67. //获取订单列表接口
  68. Route::get("list","OrderController@getOrderList");
  69. //获取订单类型接口
  70. Route::get("type/list","OrderController@getOrderTypeList");
  71. //订单详情接口
  72. Route::get("detail","OrderController@getOrderDetail");
  73. });
  74. //首页省钱
  75. Route::prefix("home")->namespace("Home")->middleware(["checkAuth"])->group(function (){
  76. //获取省钱列表接口
  77. Route::get("list","HomeController@getHomeList");
  78. //返钱赚钱接口
  79. Route::get("commission/list","HomeController@getCommissionList");
  80. });
  81. //拼多多导购相关接口
  82. Route::prefix("pdd")->namespace("Pdd")->middleware(["checkAuth"])->group(function (){
  83. //获取商品类目接口
  84. Route::get("cate/list","PddController@getCateList");
  85. //商品列表
  86. Route::get("goods/list","PddController@getGoodsList");
  87. //获取商品推广链接
  88. Route::get("goods/recommendurl","PddController@getGoodsRecommendUrl");
  89. });
  90. //电商相关接口
  91. Route::prefix("buy")->namespace("Buy")->middleware(["checkAuth"])->group(function (){
  92. //获取商品类目接口
  93. Route::get("cate/list","BuyController@getCateList");
  94. //获取商品列表接口
  95. Route::post("goods/list","BuyController@getGoodsList");
  96. //获取商品详情页接口
  97. Route::get("goods/detail","BuyController@getGoodsDetail");
  98. //商品搜索接口
  99. Route::get("goods/search","BuyController@getGoodsSearch");
  100. //获取分享淘宝商品的详情
  101. Route::get("transfer/goods","BuyController@transferGoods");
  102. });