api.php 4.3 KB

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