api.php 8.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158
  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::get('test','Auth\LoginController@test');
  15. Route::post('auth/login', 'Auth\LoginController@login')->name('login');
  16. Route::get('test', 'TestController@test');
  17. Route::middleware([
  18. 'auth:api','singleLoginApi','limitAdminLoginApp','detection_of_merchant_status'
  19. ])->group(function () {
  20. // 登出
  21. Route::post('auth/logout', 'Auth\LoginController@logout')->name('logout');
  22. // 首页
  23. Route::get('index', 'IndexController@index'); // 获取区域id name
  24. Route::post('getBikes', 'IndexController@getBikes');// 获取所有车辆 以及搜索
  25. Route::post('searchBikes', 'IndexController@searchBikes');// 获取所有车辆 以及搜索
  26. Route::get('getAreas', 'IndexController@getAreas');// 获取区域电子围栏
  27. // 车辆
  28. Route::get('bike/getBikeInfo', 'BikeController@getBikeInfoByBikeNo'); // 车辆基础信息
  29. Route::post('bike/updateBikeInfo', 'BikeController@updateBikeInfo'); // 修改车辆信息
  30. Route::post('bike/bikeLocation', 'BikeController@bikeLocation'); // 车辆位置信息
  31. Route::post('bike/sweepCodeLocation', 'BikeController@sweepCodeLocation'); //扫码位置
  32. Route::post('bike/latelyOrders', 'BikeController@latelyOrders'); //最近订单
  33. Route::post('bike/locksInfo', 'BikeController@locksLog'); //最近订单
  34. Route::get('bike/repairOptions', 'BikeController@repairOptions'); //可选报修项
  35. Route::post('bike/bikeRepair', 'BikeController@bikeRepair'); //报修
  36. Route::post('bike/bikeOnLineLog', 'BikeController@bikeOnLineLog'); //上线下线记录
  37. Route::get('bike/list', 'BikeController@bikeList'); // 车辆列表
  38. Route::get('bike/statistics', 'BikeController@bikeStatistics'); // 车辆统计
  39. Route::post('bike/latelyOrderRent', 'BikeController@latelyOrderRent'); //最近日租订单订单
  40. Route::put('bike/updateRemark/{id}','BikeController@updateRemark');// 修改车辆备注
  41. Route::get('bike/getKey','BikeController@getKey'); //获取蓝牙
  42. Route::get('bike/position', 'BikeController@bikePosition');// 车辆最新位置
  43. // 车辆检测相关
  44. Route::get('bike/login', 'BikeController@bikeLogin'); // 车辆上线
  45. Route::get('bike/logout', 'BikeController@bikeLogout'); // 车辆下线
  46. Route::get('bike/bikeBell', 'BikeController@bikeBell'); // 车辆响铃
  47. Route::get('bike/openBikeLock', 'BikeController@openBikeLock'); // 车辆开锁
  48. Route::get('bike/closeBikeLock', 'BikeController@closeBikeLock'); // 车辆关锁
  49. Route::get('bike/openBatteryLock', 'BikeController@openBatteryLock'); // 车辆开电池锁
  50. Route::get('bike/closeBatteryLock', 'BikeController@closeBatteryLock'); // 车辆关电池锁
  51. Route::get('bike/rebootBox', 'BikeController@rebootBox'); // 车辆重启中控
  52. Route::get('bike/newBikeLocation', 'BikeController@newBikeLocation'); // 车辆立即定位
  53. Route::get('bike/newBikeBatteryMSG', 'BikeController@newBikeBatteryMSG'); // 车辆立即更新电池信息
  54. Route::get('bike/repairInParking', 'BikeController@repairInParking'); // 设为在停车点
  55. // 订单
  56. Route::get('order/list', 'OrderController@orderList');
  57. Route::get('order/detail', 'OrderController@orderDetail');
  58. Route::get('order/orderStatistics', 'OrderController@orderStatistics');
  59. Route::get('order/orderProfitStatistics', 'OrderController@orderProfitStatistics'); // 收益统计
  60. Route::get('order/profitDetail', 'OrderController@profitDetail'); // 收益查询统计
  61. Route::get('order/newOrderChart', 'OrderController@newOrderChart'); // 新增订单折线统计图
  62. Route::get('order/profitChart', 'OrderController@profitChart'); // 新增订单折线统计图
  63. Route::get('order/hourOrderNumber', 'OrderController@hourOrderNumber'); // 七日内新增订单折线统计图
  64. // 日租订单
  65. Route::get('orderRent/list', 'OrderRentController@orderRentList');
  66. Route::get('orderRent/detail', 'OrderRentController@orderRentDetail');
  67. // 用户
  68. Route::get('user/list', 'UserController@userList');
  69. Route::get('user/detail', 'UserController@userDetail');
  70. Route::get('user/order', 'UserController@historicalOrder');
  71. Route::get('user/userStatistics', 'UserController@userStatistics');
  72. Route::get('user/orderRent', 'UserController@historicalOrderRent');
  73. Route::put('user/updateRemark/{id}','UserController@updateRemark');// 修改车辆备注
  74. Route::get('user/userRepaired','UserController@userRepaired');// 用户报修列表
  75. Route::get('user/userRepaired/img','UserController@getRepairedImg');// 报修图片
  76. Route::get('user/userRepaired/status','UserController@updateUserRepairedStatus');// 报修
  77. Route::get('user/feedback','UserController@feedback');// 用户问题反馈
  78. Route::get('user/feedback/read','UserController@isReadChange');// 用户问题反馈
  79. // 个人中心
  80. Route::post('personal/changePassword', 'WorkerController@changePassword');
  81. Route::post('personal/verifyOldPassword', 'WorkerController@verifyOldPassword');
  82. Route::post('personal/workerList', 'WorkerController@workerList');
  83. // 工单
  84. Route::get('work_order/list', 'WorkOrderController@workOrderList');
  85. Route::get('work_order/workOrderDetail', 'WorkOrderController@workOrderDetail'); // 工单详情
  86. Route::get('work_order/workOrderType', 'WorkOrderController@workOrderType'); // 工单类型
  87. Route::get('work_order/myWorkOrderList', 'WorkOrderController@myWorkOrder');
  88. Route::get('work_order/receive', 'WorkOrderController@receiveWorkOrder');
  89. Route::get('work_order/over', 'WorkOrderController@updateWorkOrderStatus');
  90. Route::post('work_order/upgrade', 'WorkOrderController@upgradeGroupWorkOrder');
  91. Route::any('work_order/workOrderStatistics', 'WorkOrderController@workOrderStatistics');
  92. Route::get('work_order/getWarningByWorkOrderId','WorkOrderController@getWarningByWorkOrderId'); //警报列表
  93. //停车点
  94. Route::resource('parking','ParkingController')->only(['index','update','show','store','destroy']);
  95. Route::post('parking/status','ParkingController@updateStatus');
  96. Route::post('parking/UniqueParkingName','ParkingController@UniqueParkingName');
  97. /*聚合统计接口
  98. AggregateStatisticsController
  99. */
  100. Route::get('statistics/statistics', 'AggregateStatisticsController@statistics');
  101. //解绑
  102. Route::post('control/addBike', 'Open\BikeController@addBike');
  103. Route::post('control/unbindingBike', 'Open\BikeController@unbindingBike');
  104. });
  105. // 无需token 开放接口
  106. Route::get('order/orderLocation', 'OrderController@orderLocation'); // 订单轨迹
  107. Route::post('bike/getLocationByBikeNoAndTime', 'BikeController@getLocationByBikeNoAndTime'); // 车辆位置信息
  108. Route::get('order/heatMap', 'OrderController@heatMap'); // 订单热力图 @todo
  109. Route::get('user/newUsersChart', 'UserController@newUsersChart'); // @todo
  110. // 厂测
  111. Route::prefix('open/')->middleware(['openToken'])->group(function () {
  112. Route::get('test', 'Open\BikeController@test');
  113. Route::post('addBike', 'Open\BikeController@addBike');
  114. Route::post('unbindingBike', 'Open\BikeController@unbindingBike');
  115. Route::get('bikeInfo', 'Open\BikeController@bikeInfo');
  116. Route::get('bikeInfoByBikeNo', 'Open\BikeController@bikeInfoByBikeNo');
  117. Route::get('getKey', 'Open\BikeController@getKey');
  118. Route::post('bikeBell', 'Open\BikeController@bikeBell');
  119. Route::post('bikeOpen', 'Open\BikeController@bikeOpen');
  120. Route::post('bikeClose', 'Open\BikeController@bikeClose');
  121. Route::post('bikeOpenBattery', 'Open\BikeController@bikeOpenBattery');
  122. Route::post('bikeCloseBattery', 'Open\BikeController@bikeCloseBattery');
  123. Route::post('rebootBox', 'Open\BikeController@rebootBox'); // 车辆重启中控
  124. Route::post('newBikeLocation', 'Open\BikeController@newBikeLocation'); // 车辆立即定位
  125. Route::post('newBikeBatteryMSG', 'Open\BikeController@newBikeBatteryMSG'); // 车辆立即更新电池信息
  126. });
  127. Route::post('open/login', 'Open\LoginController@login');