NavService.php 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. <?php
  2. // +----------------------------------------------------------------------
  3. // | Niucloud-admin 企业快速开发的多应用管理平台
  4. // +----------------------------------------------------------------------
  5. // | 官方网址:https://www.niucloud.com
  6. // +----------------------------------------------------------------------
  7. // | niucloud团队 版权所有 开源版本可自由商用
  8. // +----------------------------------------------------------------------
  9. // | Author: Niucloud Team
  10. // +----------------------------------------------------------------------
  11. namespace app\service\api\web;
  12. use app\model\web\Nav;
  13. use core\base\BaseApiService;
  14. /**
  15. * 导航服务层
  16. * Class FloorService
  17. * @package app\service\api\web
  18. */
  19. class NavService extends BaseApiService
  20. {
  21. public function __construct()
  22. {
  23. parent::__construct();
  24. $this->model = new Nav();
  25. }
  26. /**
  27. * 获取导航列表
  28. * @param array $where
  29. * @return array
  30. */
  31. public function getList()
  32. {
  33. $field = 'id,nav_title,nav_url,sort,is_blank,nav_icon';
  34. $order = 'sort desc';
  35. $list = $this->model->field($field)->where([['is_show', '=', 1]])->order($order)->select()->toArray();
  36. return $list;
  37. }
  38. }