route.php 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. <?php
  2. declare(strict_types=1);
  3. use think\facade\Route;
  4. use app\api\middleware\AllowCrossDomain;
  5. // 定义 API 路由组
  6. Route::group('user', function () {
  7. Route::rule('login','user/login','POST');
  8. Route::rule('userinfo','user/userinfo','GET|POST');
  9. Route::rule('logout','user/logout','GET|POST');
  10. //平台
  11. Route::rule('platform','shops/getPlatform','POST');
  12. //店铺
  13. Route::rule('shops','shops/getShop','POST');
  14. //规格
  15. Route::rule('specs','shops/getSpec','POST');
  16. //添加记录
  17. Route::rule('create','shops/create','POST');
  18. //发货记录
  19. Route::rule('delivery','shops/delivery','POST');
  20. //出入库数据
  21. Route::rule('stockList','inventory/stockList','POST');
  22. //出入库
  23. Route::rule('stock','inventory/stock','POST');
  24. //库存记录
  25. Route::rule('stocklog','inventory/stocklog','POST');
  26. //首页数据
  27. Route::rule('index','inventory/index','POST');
  28. //库存统计
  29. Route::rule('statistics','inventory/statistics','POST');
  30. })->middleware(AllowCrossDomain::class);