route.php 856 B

123456789101112131415161718192021222324252627282930313233343536373839
  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('stocklog','inventory/stocklog','POST');
  24. })->middleware(AllowCrossDomain::class);