api.php 3.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  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. $api->version('v1', [
  14. 'namespace' => 'App\Http\Controllers\V1',
  15. ], function ($api) {
  16. //登录
  17. $api->post('login', 'AuthController@authenticate');
  18. //测试签名
  19. $api->post('sign', 'IndexController@index4');
  20. //测试支付宝 支付
  21. $api->post('alipay', 'AlipayController@index');
  22. //回调
  23. $api->post('return', 'AlipayController@return');
  24. //异步回调
  25. $api->post('notify', 'AlipayController@notify');
  26. //测试微信支付
  27. $api->post('weixin', 'WeixinPayController@index');
  28. //微信回调
  29. $api->post('wxin_notify', 'WeixinPayController@notify');
  30. //测试短信验证码
  31. $api->post('send_sms', 'SendSmsController@index');
  32. //手机号码注册
  33. $api->post('mobileRegister', 'AuthController@mobileRegister');
  34. //微信注册
  35. $api->post('weixinRegister', 'AuthController@weixinRegister');
  36. //手机号码,密码登录
  37. $api->post('mobileLogin', 'AuthController@mobileLogin');
  38. //手机号码短信登陆
  39. $api->post('mobileSmsLogin', 'AuthController@mobileSmsLogin');
  40. //微信登录
  41. $api->post('weixinLogin', 'AuthController@weixinLogin');
  42. //测试reids
  43. $api->post('loginCount', 'AuthController@loginCount');
  44. $api->group(['middleware' => 'auth:api'], function ($api) {
  45. });
  46. //登录+验签
  47. $api->group(['middleware' => ['chxq_jwt_auth','chxq_sign']], function ($api) {
  48. //登出
  49. $api->post('logout', 'AuthController@logout');
  50. //刷新身份令牌
  51. $api->post('refresh', 'AuthController@refresh');
  52. //绑定微信
  53. $api->post('bindWeixin', 'AuthController@bindWeixin');
  54. //绑定手机
  55. $api->post('bindMobile', 'AuthController@bindMobile');
  56. //设置密码
  57. $api->post('setPassword', 'AuthController@setPassword');
  58. //修改密码
  59. $api->post('updatePassword', 'AuthController@updatePassword');
  60. //解绑温馨
  61. $api->post('unbindWeixin', 'AuthController@unbindWeixin');
  62. //检查微信号是否绑定
  63. $api->post('isBindWeixin', 'AuthController@isBindWeixin');
  64. //新增快递地址
  65. $api->post('addExpressAddress', 'MemberExpressAddressController@addExpressAddress');
  66. //新增自提地址
  67. $api->post('addSelfAddress', 'MemberExpressAddressController@addSelfAddress');
  68. //用户自提地址
  69. $api->post('selfAddressList', 'MemberExpressAddressController@selfAddressList');
  70. //删除地址
  71. $api->post('addressDelete', 'MemberExpressAddressController@delete');
  72. //设置默认地址
  73. $api->post('addressIsDefault', 'MemberExpressAddressController@isDefault');
  74. });
  75. //仅验签
  76. $api->group(['middleware' => 'chxq_sign'], function ($api) {
  77. });
  78. });