product.php 1.3 KB

123456789101112131415161718192021222324252627282930313233343536
  1. <?php
  2. // +----------------------------------------------------------------------
  3. // | [ WE CAN DO IT MORE SIMPLE ]
  4. // +----------------------------------------------------------------------
  5. // | Copyright (c) 2018-2020 rights reserved.
  6. // +----------------------------------------------------------------------
  7. // | Author: TABLE ME
  8. // +----------------------------------------------------------------------
  9. // | Date: 2020-09-05 09:21
  10. // +----------------------------------------------------------------------
  11. use app\api\middleware\AllowOriginMiddleware;
  12. use app\api\middleware\SeretKeyMiddleware;
  13. use app\api\middleware\UserMiddleware;
  14. use think\facade\Route;
  15. Route::group('product', function () {
  16. //分类列表
  17. Route::rule('categoryList', 'Product/categoryList');
  18. //分类树
  19. Route::rule('categoryTree', 'Product/categoryTree');
  20. //品牌列表
  21. Route::rule('brandList', 'Product/brandList');
  22. //商品列表
  23. Route::rule('productList', 'Product/productList');
  24. //商品详情
  25. Route::rule('productDetail', 'Product/productDetail');
  26. //评价列表
  27. Route::rule('replyList', 'Product/replyList');
  28. //添加评价
  29. Route::rule('addReply', 'Product/addReply');
  30. })->middleware([
  31. AllowOriginMiddleware::class,
  32. SeretKeyMiddleware::class,
  33. UserMiddleware::class,
  34. ]);