api.php 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  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',
  15. ], function ($api) {
  16. //登录
  17. $api->group(['middleware' => 'chxq_jwt_auth'], function ($api) {
  18. $api->post('upload', 'UploadController@uploadImage');
  19. $api->post('multi_upload', 'UploadController@uploadImages');
  20. });
  21. //登录+验签
  22. $api->group(['middleware' => ['chxq_jwt_auth','chxq_sign']], function ($api) {
  23. });
  24. //仅验签
  25. $api->group(['middleware' => 'chxq_sign'], function ($api) {
  26. //公共配置
  27. $api->get('/config','ConfigController@index');
  28. //自提点列表
  29. $api->get('/pickupNode/index','ConfigPickupNodeController@index');
  30. //获取某自提点
  31. $api->get('/pickupNode/getPickupNode','ConfigPickupNodeController@getPickupNode');
  32. //已开通城市列表
  33. $api->get('/cityManagement/index','ConfigCityManagementController@index');
  34. //获取省市区
  35. $api->get('/configProvince/index', 'ConfigProvinceController@index');
  36. //储存方式列表
  37. $api->get('/storeType/index', 'StoreTypeController@index');
  38. });
  39. });