api-v1.php 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268
  1. <?php
  2. /*
  3. |--------------------------------------------------------------------------
  4. | Application Routes
  5. |--------------------------------------------------------------------------
  6. |
  7. | Here is where you can register all of the routes for an application.
  8. | It is a breeze. Simply tell Lumen the URIs it should respond to
  9. | and give it the Closure to call when that URI is requested.
  10. |
  11. */
  12. $api = app('Dingo\Api\Routing\Router');
  13. /** @var TYPE_NAME $api */
  14. $api->version('v1', [
  15. 'namespace' => 'App\Http\Controllers\V1',
  16. 'middleware' => ['serializer:array', 'cors']// 'bindings'
  17. ], function (\Dingo\Api\Routing\Router $api) {
  18. $api->get('/t', 'ExampleController@test');
  19. $api->get('/d', 'ExampleController@decode');
  20. $api->get('/check', 'ExampleController@check');
  21. $api->get('/user/token', 'ExampleController@token');
  22. $api->get('/test/order-refund', 'ExampleController@orderRefund');
  23. // 广告管理
  24. $api->get('/ads', 'AdvertisementController@index');
  25. $api->get('/ad', 'AdvertisementController@show');
  26. // 公告
  27. $api->get('/ans', 'AnnouncementController@index');
  28. $api->get('/an', 'AnnouncementController@show');
  29. $api->get('/index/an', 'AnnouncementController@indexShow');
  30. //h5招商
  31. $api->post('/h5/business', 'H5Controller@business');
  32. // 微信小程序授权登录
  33. $api->post('/auth/weapp-login', 'AuthController@weappLogin');
  34. // 认证通过
  35. $api->group(['middleware' => ['auth:api', 'singleLogin']], function ($api) {
  36. // 微信同步用户信息
  37. $api->post('/auth/weapp-userinfo-sync', 'AuthController@weappUserInfoSync');
  38. $api->post('/auth/mobileLogin', 'AuthController@mobileLogin');
  39. //获取当前登录用户
  40. $api->get('/me', 'AuthController@loginUser');
  41. //获取用户的状态
  42. $api->get('/user/status', "UserController@userStatus");
  43. $api->get('/user/wallerLogList', "UserController@userWallerLogList");
  44. // 邀请新用户
  45. $api->get('/user/getInviteWechatQrcode', 'UserController@getInviteWechatQrcode');// 获取邀请新用户二维码
  46. $api->get('/user/getInvitePoster', 'UserController@getInvitePoster'); // 获取邀请海报
  47. $api->post('/user/getInviteNewUsersReward', 'UserController@getInviteNewUsersReward');// 获取奖励
  48. $api->get('/user/getInviteUsers', 'UserController@getInviteUsers'); // 获取邀请的用户
  49. // 获取邀请新用户活动配置
  50. $api->get('/pages/inviteNewusersConfigs', 'PageController@inviteNewusersConfigs');
  51. /**
  52. * 页面初始化
  53. */
  54. // 首页
  55. $api->post('/pages/home', "PageController@home");
  56. $api->get('/pages/ride-order', "PageController@rideOrder");
  57. //押金退款状态
  58. $api->get('/pages/user-deposit-status', 'PageController@userDepositStatus');
  59. // 申请增加还车点
  60. $api->post('/pages/applyAddParking', "PageController@applyAddParking");
  61. /**
  62. * 车
  63. */
  64. // 根据位置找车
  65. $api->post('/bikes', "BikeController@index");
  66. // 全部区域
  67. $api->get('/areas', 'AreaController@index');
  68. // 根据位置找车和停车区
  69. // 根据位置查找停车区
  70. $api->get('/parking/stop-sites', 'ParkingController@stopSite');
  71. // 查找禁停区
  72. $api->get('/parking/ban-stop-sites', 'ParkingController@banStopSite');
  73. // 单个车的信息
  74. $api->get('/bike/{bike_no:[0-9]+}', "BikeController@show");
  75. // 响铃寻车
  76. $api->get('/bike/find/{bike_no:[0-9]+}', "BikeController@findBike");
  77. // 订单重试开锁
  78. $api->get('/order/retry-open-lock', "OrderController@retryOpenLock");
  79. // 订单重试关锁
  80. $api->get('/order/retry-close-lock', "OrderController@retryCloseLock");
  81. // 订单重试响铃
  82. $api->get('/order/retry-bell-lock', "OrderController@retryBellLock");
  83. //获取当前骑行费用
  84. $api->post('/order/expect-order-money', 'OrderController@expectOrderMoney');
  85. //检查是否可以还车
  86. $api->post('/bike/check-is-riding-area', 'BikeController@checkBikeIsRidingArea');
  87. // 开锁
  88. $api->post('/bike/open-lock', "BikeController@openLock");
  89. //锁车
  90. $api->post('/bike/close-lock', "BikeController@closeLock");
  91. //是否在停车区
  92. $api->post('/bike/is-stop-parking', 'BikeController@checkBikeIsInStopParking');
  93. //临时停车
  94. $api->post('/bike/temporary-close-lock', "BikeController@temporaryCloseLock");
  95. //临时开车
  96. $api->post('/bike/temporary-open-lock', "BikeController@temporaryOpenLock");
  97. //获取蓝牙秘钥
  98. $api->get('/blu/get-key', 'BluController@getKey');
  99. //获取骑行订单
  100. $api->get('/order/ride-status', 'OrderController@orderRideStatus');
  101. // 获取订单支付页面接口
  102. $api->get('/order/pay-show', 'OrderController@payShow');
  103. // 优惠券
  104. $api->get('/coupon', 'CouponController@index');
  105. $api->get('/coupon/getCouponsByOrder', 'CouponController@getCouponsByOrder');
  106. // 检查用户订单(押金,骑行订单,充值)是否支付
  107. $api->post('/payment/pay-status', 'PaymentController@checkOrderPayStatus');
  108. // 订单支付请求
  109. $api->post('/order/pay', "OrderController@pay");
  110. // 订单车辆位置
  111. $api->get('/order/orderBikePosition', "OrderController@orderBikePosition");
  112. // 报修提交
  113. $api->post('/trouble', 'TroubleController@store');
  114. // 上传图片接口
  115. $api->post('/upload/image', 'UploadController@image');
  116. /**
  117. * 完善个人信息(注册)
  118. */
  119. // 实名认证
  120. $api->post('/user/real-name-authentication', 'UserController@realNameAuthentication');
  121. // 手机号绑定
  122. $api->post('/user/bind-wechat-mobile', 'UserController@bindWechatMobile');
  123. $api->post('/user/bind-mobile', 'UserController@bindMobile');
  124. // 绑定用户的form_id
  125. // $api->post('/user/store-form-id', 'UserController@storeFormId');
  126. // 验证码
  127. $api->post('/verification-code', 'UserController@sendVerificationCode');
  128. // 支付押金
  129. $api->post('/deposit/pay', 'DepositOrderController@store');
  130. // 退押金接口(马上)
  131. $api->post('/deposit/refund', 'DepositOrderController@refund');
  132. //退押金(队列)
  133. $api->post('/deposit/refund-job', 'DepositOrderController@refundJob');
  134. // 获取订单列表
  135. $api->get('/orders', "OrderController@index");
  136. // 获取订单详情
  137. $api->get('/order', "OrderController@show");
  138. // 充值接口
  139. $api->post('/rechange/pay', 'RechangeOrderController@store');
  140. //问题反馈
  141. $api->post('/question', 'QuestionController@store');
  142. /**
  143. * 日租车
  144. */
  145. //日租下单
  146. $api->post('/rent/store-order', 'RentBikeController@storeOrder');
  147. //结束日租订单
  148. $api->post('/rent/close-order', 'RentBikeController@closeOrder');
  149. //日租开车
  150. $api->post('/rent/open-bike', 'RentBikeController@openBike');
  151. //日租关车
  152. $api->post('/rent/close-bike', 'RentBikeController@closeBike');
  153. //日租车响铃寻车
  154. $api->get('/rent/retry-bell', "RentBikeController@retryBell");
  155. // 日租订单列表
  156. $api->get('/rent/orders', 'RentBikeController@orders');
  157. $api->get('/rent/use-order', 'RentBikeController@useOrder');
  158. $api->get('/rent/order', 'RentBikeController@show');
  159. $api->get('/rent/pay-show', 'RentBikeController@payShow');
  160. $api->post('/rent/pay', 'RentBikeController@pay');
  161. //是否在停车区
  162. $api->post('/rent/is-stop-parking', 'RentBikeController@checkBikeIsInStopParking');
  163. //获取当前骑行费用
  164. $api->post('/rent/expect-rent-order-money', 'RentBikeController@expectRentOrderMoney');
  165. //检查是否可以还车
  166. $api->post('/rent/check-is-riding-area', 'RentBikeController@checkBikeIsRidingArea');
  167. //********************** 骑行卡 ***************************************************************
  168. //*
  169. $api->get('/card_riding/index', 'CardRidingController@index'); //*
  170. $api->post('/card_riding/pay', 'CardRidingController@buyCardRiding'); //*
  171. $api->post('/card_riding/no_pay', 'CardRidingController@changeCardRidingOrderStatus'); //*
  172. $api->get('/card_riding/user_card', 'CardRidingController@userCardRiding'); //*
  173. $api->get('/card_riding/user_history_orders', 'CardRidingController@CardRidingOrderHistory'); //*
  174. //*
  175. //*************************************************************************************************
  176. //充值活动参数
  177. $api->get('/pages/recharge', 'PageController@rechargePage');
  178. //***************************** 押金卡********************************************************
  179. $api->get('/deposit_card/index', 'DepositCardOrderController@index');
  180. $api->post('/deposit_card/pay', 'DepositCardOrderController@buyDepositCard');
  181. //***************************** 罚单***********
  182. $api->get('/punishment_orders', 'PunishmentOrderController@index');
  183. $api->get('/punishment_order', 'PunishmentOrderController@show');
  184. $api->post('/punishment_order/pay', 'PunishmentOrderController@pay');
  185. });
  186. // *************************************************************************
  187. $api->get('/parking/nearby', 'ParkingController@nearbySite');
  188. // 通知公告通知
  189. // 微信支付接口通知
  190. $api->any("/payments/wechat-notify", 'PaymentController@notify');
  191. $api->any("/payments/wechat-rent-notify", 'PaymentController@rentNotify');
  192. $api->any("/payments/wechat-refund-notify", 'PaymentController@refundNotify');
  193. $api->any("/payments/wechat-refund-api", 'PaymentController@isOrderRefundPay');
  194. /**
  195. * replay端接口
  196. */
  197. $api->get('/relay/order/auto-close', 'OrderController@autoCloseOrder');
  198. /**
  199. * 对外提供接口
  200. */
  201. $api->get('/common/clear-cache', 'ApiController@clearCache');
  202. $api->get('/common/refund-out-deposit', 'ApiController@refundOutDeposit');
  203. });