api-v1.php 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294
  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. * 支付宝test请求--
  34. */
  35. $api->get('/loginali', 'TestController@login');
  36. $api->get('/alipayment', 'TestController@alipayment');
  37. $api->get('/dev_alipay_notify', 'TestController@alipay_notify');
  38. $api->get('/yushouquan', 'TestController@zijinyushouquan');
  39. // 微信小程序授权登录
  40. $api->post('/auth/app-login', 'AuthController@xiaoLogin');
  41. $api->post('/auth/weapp-login', 'AuthController@xiaoLogin');
  42. // 认证通过
  43. $api->group(['middleware' => ['auth:api', 'singleLogin']], function ($api) {
  44. // 微信同步用户信息
  45. $api->post('/auth/weapp-userinfo-sync', 'AuthController@weappUserInfoSync');
  46. $api->post('/auth/mobileLogin', 'AuthController@mobileLogin');
  47. //获取当前登录用户
  48. $api->get('/me', 'AuthController@loginUser');
  49. //获取用户的状态
  50. $api->get('/user/status', "UserController@userStatus");
  51. $api->get('/user/wallerLogList', "UserController@userWallerLogList");
  52. // 邀请新用户
  53. $api->get('/user/getInviteWechatQrcode', 'UserController@getInviteWechatQrcode');// 获取邀请新用户二维码
  54. $api->get('/user/getInvitePoster', 'UserController@getInvitePoster'); // 获取邀请海报
  55. $api->post('/user/getInviteNewUsersReward', 'UserController@getInviteNewUsersReward');// 获取奖励
  56. $api->get('/user/getInviteUsers', 'UserController@getInviteUsers'); // 获取邀请的用户
  57. $api->post('/user/newUserCoupons', 'UserController@newUserCoupons'); // 获取邀请的用户
  58. // 获取邀请新用户活动配置
  59. $api->get('/pages/inviteNewusersConfigs', 'PageController@inviteNewusersConfigs');
  60. /**
  61. * 页面初始化
  62. */
  63. // 首页
  64. $api->post('/pages/home', "PageController@home");
  65. $api->get('/pages/ride-order', "PageController@rideOrder");
  66. //押金退款状态
  67. $api->get('/pages/user-deposit-status', 'PageController@userDepositStatus');
  68. // 申请增加还车点
  69. $api->post('/pages/applyAddParking', "PageController@applyAddParking");
  70. /**
  71. * 车
  72. */
  73. // 根据位置找车
  74. $api->post('/bikes', "BikeController@index");
  75. // 全部区域
  76. $api->get('/areas', 'AreaController@index');
  77. // 根据位置找车和停车区
  78. // 根据位置查找停车区
  79. $api->get('/parking/stop-sites', 'ParkingController@stopSite');
  80. // 查找禁停区
  81. $api->get('/parking/ban-stop-sites', 'ParkingController@banStopSite');
  82. // 单个车的信息
  83. $api->get('/bike/{bike_no:[0-9]+}', "BikeController@show");
  84. // 响铃寻车
  85. $api->get('/bike/find/{bike_no:[0-9]+}', "BikeController@findBike");
  86. // 订单重试开锁
  87. $api->get('/order/retry-open-lock', "OrderController@retryOpenLock");
  88. // 订单重试关锁
  89. $api->get('/order/retry-close-lock', "OrderController@retryCloseLock");
  90. // 订单重试响铃
  91. $api->get('/order/retry-bell-lock', "OrderController@retryBellLock");
  92. //获取当前骑行费用
  93. $api->post('/order/expect-order-money', 'OrderController@expectOrderMoney');
  94. //检查是否可以还车
  95. $api->post('/bike/check-is-riding-area', 'BikeController@checkBikeIsRidingArea');
  96. // 开锁
  97. $api->post('/bike/open-lock', "BikeController@openLock");
  98. //锁车
  99. $api->post('/bike/close-lock', "BikeController@closeLock");
  100. //是否在停车区
  101. $api->post('/bike/is-stop-parking', 'BikeController@checkBikeIsInStopParking');
  102. //临时停车
  103. $api->post('/bike/temporary-close-lock', "BikeController@temporaryCloseLock");
  104. //临时开车
  105. $api->post('/bike/temporary-open-lock', "BikeController@temporaryOpenLock");
  106. //获取蓝牙秘钥
  107. $api->get('/blu/get-key', 'BluController@getKey');
  108. //获取骑行订单
  109. $api->get('/order/ride-status', 'OrderController@orderRideStatus');
  110. // 获取订单支付页面接口
  111. $api->get('/order/pay-show', 'OrderController@payShow');
  112. // 优惠券
  113. $api->get('/coupon', 'CouponController@index');
  114. $api->get('/coupon/getCouponsByOrder', 'CouponController@getCouponsByOrder');
  115. // 检查用户订单(押金,骑行订单,充值)是否支付
  116. $api->post('/payment/pay-status', 'PaymentController@checkOrderPayStatus');
  117. // 订单支付请求
  118. $api->post('/order/pay', "OrderController@pay");
  119. // 订单车辆位置
  120. $api->get('/order/orderBikePosition', "OrderController@orderBikePosition");
  121. // 报修提交
  122. $api->post('/trouble', 'TroubleController@store');
  123. // 上传图片接口
  124. // $api->post('/upload/image', 'UploadController@image');
  125. /**
  126. * 完善个人信息(注册)
  127. */
  128. // 实名认证
  129. $api->post('/user/real-name-authentication', 'UserController@realNameAuthentication');
  130. // 手机号绑定
  131. $api->post('/user/bind-wechat-mobile', 'UserController@bindWechatMobile');
  132. $api->post('/user/bind-mobile', 'UserController@bindMobile');
  133. //学生认证
  134. $api->post('/user/student', 'UserController@students');
  135. $api->get('/coupon/getNewUserCoupons', 'CouponController@getNewUserCoupons');
  136. // 绑定用户的form_id
  137. // $api->post('/user/store-form-id', 'UserController@storeFormId');
  138. // 验证码
  139. $api->post('/verification-code', 'UserController@sendVerificationCode');
  140. // 支付押金
  141. $api->post('/deposit/pay', 'DepositOrderController@store');
  142. // 退押金接口(马上)
  143. $api->post('/deposit/refund', 'DepositOrderController@refund');
  144. //退押金(队列)
  145. $api->post('/deposit/refund-job', 'DepositOrderController@refundJob');
  146. // 获取订单列表
  147. $api->get('/orders', "OrderController@index");
  148. // 获取订单详情
  149. $api->get('/order', "OrderController@show");
  150. // 充值接口
  151. $api->post('/rechange/pay', 'RechangeOrderController@store');
  152. //问题反馈
  153. $api->post('/question', 'QuestionController@store');
  154. /**
  155. * 日租车
  156. */
  157. //日租下单
  158. $api->post('/rent/store-order', 'RentBikeController@storeOrder');
  159. //结束日租订单
  160. $api->post('/rent/close-order', 'RentBikeController@closeOrder');
  161. //日租开车
  162. $api->post('/rent/open-bike', 'RentBikeController@openBike');
  163. //日租关车
  164. $api->post('/rent/close-bike', 'RentBikeController@closeBike');
  165. //日租车响铃寻车
  166. $api->get('/rent/retry-bell', "RentBikeController@retryBell");
  167. // 日租订单列表
  168. $api->get('/rent/orders', 'RentBikeController@orders');
  169. $api->get('/rent/use-order', 'RentBikeController@useOrder');
  170. $api->get('/rent/order', 'RentBikeController@show');
  171. $api->get('/rent/pay-show', 'RentBikeController@payShow');
  172. $api->post('/rent/pay', 'RentBikeController@pay');//日租支付
  173. //是否在停车区
  174. $api->post('/rent/is-stop-parking', 'RentBikeController@checkBikeIsInStopParking');
  175. //获取当前骑行费用
  176. $api->post('/rent/expect-rent-order-money', 'RentBikeController@expectRentOrderMoney');
  177. //检查是否可以还车
  178. $api->post('/rent/check-is-riding-area', 'RentBikeController@checkBikeIsRidingArea');
  179. //********************** 骑行卡 ***************************************************************
  180. //*
  181. $api->get('/card_riding/index', 'CardRidingController@index'); //*
  182. $api->post('/card_riding/pay', 'CardRidingController@buyCardRiding'); //*
  183. $api->post('/card_riding/no_pay', 'CardRidingController@changeCardRidingOrderStatus'); //*
  184. $api->get('/card_riding/user_card', 'CardRidingController@userCardRiding'); //*
  185. $api->get('/card_riding/user_history_orders', 'CardRidingController@CardRidingOrderHistory'); //*
  186. //*
  187. //*************************************************************************************************
  188. //充值活动参数
  189. $api->get('/pages/recharge', 'PageController@rechargePage');
  190. //***************************** 押金卡********************************************************
  191. $api->get('/deposit_card/index', 'DepositCardOrderController@index');
  192. $api->post('/deposit_card/pay', 'DepositCardOrderController@buyDepositCard');
  193. //***************************** 罚单***********
  194. $api->get('/punishment_orders', 'PunishmentOrderController@index');
  195. $api->get('/punishment_order', 'PunishmentOrderController@show');
  196. $api->post('/punishment_order/pay', 'PunishmentOrderController@pay');
  197. });
  198. // *************************************************************************
  199. $api->get('/parking/nearby', 'ParkingController@nearbySite');
  200. // 通知公告通知
  201. // 微信支付接口通知
  202. $api->any("/payments/wechat-notify/{merchant_id}", 'PaymentController@notify'); //支付接口回调
  203. $api->any("/payments/wechat-rent-notify/{merchant_id}", 'PaymentController@rentNotify'); // 日租退款回调
  204. $api->any("/payments/wechat-refund-notify/{merchant_id}", 'PaymentController@refundNotify'); //押金退款回调
  205. $api->any("/payments/wechat-refund-api", 'PaymentController@isOrderRefundPay'); //是否退款成功
  206. //支付宝异步通知
  207. $api->any('/alipay_notify/{merchant_id}', 'PaymentController@alipay_notify');//支付宝支付通知
  208. $api->any('/payments/alipay_rent_notify/{merchant_id}', 'PaymentController@alipay_rent_notify');//支付宝日租支付通知
  209. $api->any('/alipay_yushouquan/{merchant_id}', 'PaymentController@alipay_yushouquan_notify');//支付宝预授权支付通知
  210. /**
  211. * replay端接口
  212. */
  213. $api->get('/relay/order/auto-close', 'OrderController@autoCloseOrder');
  214. /**
  215. * 对外提供接口
  216. */
  217. $api->get('/common/clear-cache', 'ApiController@clearCache');//清楚缓存
  218. $api->get('/common/queren-tui', 'ApiController@alipayRefundLog');//押金支付宝退款
  219. $api->get('/common/alipay-refund-little', 'ApiController@alipayRefundLittle');//骑行订单支付宝返还一点点
  220. $api->get('/common/alipay-jiedong', 'ApiController@alipayYushouquanJiedongApi');//押金支付宝预授权解冻
  221. $api->post('/upload/image', 'UploadController@image');
  222. });