Goodsbrand.php 854 B

1234567891011121314151617181920212223242526272829303132
  1. <?php
  2. namespace app\api\controller;
  3. use app\model\goods\GoodsBrand as GoodsBrandModel;
  4. /**
  5. * 商品品牌
  6. * Class Goodsbrand
  7. * @package app\api\controller
  8. */
  9. class Goodsbrand extends BaseApi
  10. {
  11. /**
  12. * 列表信息
  13. * @return string
  14. */
  15. public function page()
  16. {
  17. $page = isset($this->params['page']) ? $this->params['page'] : 1;
  18. $page_size = isset($this->params['page_size']) ? $this->params['page_size'] : PAGE_LIST_ROWS;
  19. $site_id = isset($this->params['site_id']) ? $this->params['site_id'] : 0;
  20. $goods_brand_model = new GoodsBrandModel();
  21. $condition = [
  22. [ 'ngb.site_id', '=', $site_id ]
  23. ];
  24. $list = $goods_brand_model->getBrandPageList($condition, $page, $page_size, 'ngb.sort desc,ngb.create_time desc', 'ngb.brand_id, ngb.brand_name, ngb.brand_initial,ngb.site_id, ngb.image_url');
  25. return $this->response($list);
  26. }
  27. }