api.php 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122
  1. <?php
  2. /*
  3. * This file is part of the Jiannei/lumen-api-starter.
  4. *
  5. * (c) Jiannei <longjian.huang@foxmail.com>
  6. *
  7. * This source file is subject to the MIT license that is bundled
  8. * with this source code in the file LICENSE.
  9. */
  10. use Illuminate\Support\Facades\Route;
  11. /*
  12. |--------------------------------------------------------------------------
  13. | Application Routes
  14. |--------------------------------------------------------------------------
  15. |
  16. | Here is where you can register all of the routes for an application.
  17. | It is a breeze. Simply tell Lumen the URIs it should respond to
  18. | and give it the Closure to call when that URI is requested.
  19. |
  20. */
  21. /**
  22. * 公共
  23. */
  24. Route::group([
  25. 'prefix' => 'common'
  26. ], function () {
  27. Route::get('enums', 'CommonController@enums');
  28. // Route::get('clear', 'CommonController@clear');
  29. // Route::get('test', 'CommonController@test');
  30. });
  31. /**
  32. * 基础模块
  33. */
  34. Route::group([
  35. 'namespace' => 'Base',
  36. 'prefix' => 'base'
  37. ], function () {
  38. Route::post('/auth/mobile/send-validate-code', 'AuthController@sendLoginValidateCode');
  39. Route::post('/auth/mobile', 'AuthController@mobileLogin');
  40. Route::post('/auth/wechat', 'AuthController@wxLogin');
  41. Route::post('/auth/testToken', 'UserController@testToken');
  42. Route::post('/auth/test-mobile-login', 'AuthController@testMobileLogin');
  43. // //配置文件
  44. Route::post('/setting/configs', 'SettingController@configs');
  45. // Route::post('/dicts/configs', 'DictController@configs');
  46. // Route::get('/dicts/config', 'DictController@config');
  47. //微信公众号
  48. Route::post('/wechat/jssdk', 'WatchController@jssdk');
  49. Route::group([
  50. // 'middleware' => ['jwt.auth', 'jwt.refresh', 'auth.role:user']
  51. 'middleware' => ['jwt.auth', 'auth.role:user', 'single:api']
  52. ], function () {
  53. Route::get('/auth/me', 'AuthController@me');
  54. Route::get('/auth/logout', 'AuthController@logout');
  55. Route::post('/user/is-read-xin', 'UserController@isReadXin');
  56. Route::get('/common/clear', 'CommonController@clear');
  57. });
  58. });
  59. Route::group([
  60. 'namespace' => 'Dwbs',
  61. 'prefix' => 'dwbs',
  62. 'middleware' => ['jwt.auth', 'auth.role:user', 'single:api']
  63. ], function () {
  64. //排行榜
  65. Route::get('/rankings', 'RankingController@index');
  66. Route::get('/ranking/show-status', 'RankingController@showStatus');
  67. Route::get('/ranking/rolling-mes', 'UserXuefenController@rollingMes');
  68. Route::get('/xuefens', 'UserXuefenController@index');
  69. Route::post('/xuefen/verify', 'UserXuefenController@verify');
  70. Route::get('/order', 'OrderController@show');
  71. Route::get('/shop/goods', 'ShopGoodController@index');
  72. Route::get('/shop/orders', 'ShopOrderController@index');
  73. Route::post('/shop/order', 'ShopOrderController@store');
  74. Route::get('/shop/order', 'ShopOrderController@show');
  75. Route::post('/shop/order/update-address', 'ShopOrderController@updateAddress');
  76. Route::post('/shop/order/close', 'ShopOrderController@closeOrder');
  77. Route::get('/shop/order/express', 'ShopOrderController@express');
  78. Route::get('/addresses', 'UserAddressController@index');
  79. Route::get('/address', 'UserAddressController@show');
  80. Route::post('/address', 'UserAddressController@store');
  81. Route::put('/address', 'UserAddressController@update');
  82. Route::delete('/address', 'UserAddressController@destroy');
  83. Route::post('/address/analysis', 'UserAddressController@analysis');
  84. Route::get('/address/default', 'UserAddressController@meDefault');
  85. Route::post('/address/update-is-default', 'UserAddressController@updateIsDefault');
  86. Route::get('/jifens', 'UserJifenController@index');
  87. Route::get('/business/category/select-options', 'BusinessCategoryController@selectOptions');
  88. Route::get('/business/schools', 'BusinessSchoolController@index');
  89. Route::get('/business/school', 'BusinessSchoolController@show');
  90. Route::get('/home/me-analysis', 'HomeController@meAnalysis');
  91. Route::get('/zhengshu/me', 'ZhengshuController@meZhengshu');
  92. Route::get('/zhengshus', 'ZhengshuController@index');
  93. Route::get('/zhengshu/resources', 'ZhengshuController@resources');
  94. Route::get('/zhengshu/chengjius', 'ChengjiuController@index');
  95. Route::get('/zhengshu/chengjiu/download', 'ChengjiuController@download');
  96. });