Index.php 414 B

123456789101112131415161718192021222324
  1. <?php
  2. namespace app\api\controller\mall;
  3. use app\common\controller\Api;
  4. use app\common\model\Category;
  5. /**
  6. * 商城首页接口
  7. * @inheritdoc
  8. */
  9. class Index extends Api
  10. {
  11. protected $noNeedLogin = '*';
  12. protected $noNeedRight = '*';
  13. /**
  14. * 首页分类和商品
  15. */
  16. public function category(){
  17. $category=Category::mall(['goods']);
  18. $this->success('',$category);
  19. }
  20. }