web.php 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. <?php
  2. use Illuminate\Http\Request;
  3. /*
  4. |--------------------------------------------------------------------------
  5. | Application Routes
  6. |--------------------------------------------------------------------------
  7. |
  8. | Here is where you can register all of the routes for an application.
  9. | It is a breeze. Simply tell Lumen the URIs it should respond to
  10. | and give it the Closure to call when that URI is requested.
  11. |
  12. */
  13. /** @var TYPE_NAME $api */
  14. $api = app('Dingo\Api\Routing\Router');
  15. $api->version('v1',[
  16. 'namespace'=>'App\Http\Controllers'
  17. ],function ($api){
  18. $api->group([
  19. 'middleware' => 'api.throttle',
  20. 'limit' => 1000,
  21. 'expires' => 1,
  22. ],function ($api){
  23. $api->post('/pay/return','PayController@message');
  24. $api->post('/pay/refound','PayController@refound');
  25. $api->get('/user/login','WechatController@login');//获取openid,判断是否有此用户 xin----
  26. $api->post('/user/SaveUserAvatar','UserController@SaveUserAvatar');//获取openid,判断是否有此用户
  27. $api->group(['middleware' => 'jwt.auth'], function($api) {
  28. $api->get('user/messageroll','UserController@get_roll');
  29. $api->get('user/SaveUserInfo','UserController@SaveUserInfo');
  30. $api->post('/user/update_phone','UserController@update_phone');//修改手机号
  31. $api->get('/user/return_userinfo','UserController@return_userinfo');//修改手机号
  32. $api->get('/course/course_list','CourseController@course_list');
  33. $api->get('/course/GetSeason','CourseController@GetSeason');
  34. $api->get('/user/account_status','UserController@account_status');//xin---
  35. $api->get('basic/GetRule','UserController@GetRule');
  36. });
  37. });
  38. $api->group([
  39. 'middleware' => 'api.throttle',
  40. 'limit' => 5000,
  41. 'expires' => 1,
  42. ], function($api) {
  43. $api->get('/user/send_verify','VerificationCodesController@store'); //发送验证码(先判断卖帮帮中是否有此用户)
  44. $api->post('/pay/refunds','PayController@sure_code');//验证验证码,同时创建用户,返回信息
  45. });
  46. $api->post('/user/verify_code','UserController@store');//验证验证码,同时创建用户,返回信息
  47. $api->get('/user/GetUpgradeInfo','UserController@GetUpgradeInfo');//
  48. $api->get('/version','IndexController@index');
  49. $api->get('/weixinUrl','WechatController@weixinUrl');
  50. });