api.php 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. <?php
  2. use Illuminate\Http\Request;
  3. use Illuminate\Support\Facades\Route;
  4. /*
  5. |--------------------------------------------------------------------------
  6. | API Routes
  7. |--------------------------------------------------------------------------
  8. |
  9. | Here is where you can register API routes for your application. These
  10. | routes are loaded by the RouteServiceProvider within a group which
  11. | is assigned the "api" middleware group. Enjoy building your API!
  12. |
  13. */
  14. Route::prefix("v1")->group(function (){
  15. Route::middleware('throttle:' . config('api.rate_limits.sign'))
  16. ->group(function () {
  17. //登录
  18. Route::POST('login', 'LoginController@login');
  19. });
  20. Route::middleware(['throttle:' . config('api.rate_limits.access'),"authorizing"])
  21. ->group(function () {
  22. Route::prefix("waybill")->group(function () {
  23. Route::prefix("dispatch")->group(function () {
  24. Route::GET('/', 'WaybillController@getData');
  25. Route::POST('/', 'WaybillController@dispatch');
  26. Route::POST('dailyBilling', 'WaybillController@dailyBilling');
  27. });
  28. });
  29. Route::prefix("order")->group(function () {
  30. Route::GET('batchRecover', 'OrderController@recoverBatch');
  31. });
  32. Route::prefix("inventory")->group(function () {
  33. Route::get('inventoryTask', 'InventoryController@getInventoryTask');
  34. Route::POST('locationInvPro', 'InventoryController@locationInvPro');
  35. Route::POST('getInventoryDetail', 'InventoryController@getInventoryDetail');
  36. Route::POST('stockInventory', 'InventoryController@stockInventory');
  37. Route::POST('skipInventory', 'InventoryController@skipInventory');
  38. });
  39. });
  40. });