1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950 |
- <?php
- namespace app\admin\controller\base\other;
- use app\admin\controller\Base;
- use app\common\model\base\other\Remixicon as remixiconModel;
- class Remixicon extends Base
- {
- protected $remixiconModel = null;
- protected $noNeedAuth = ['getList'];
- public function initialize()
- {
- parent::initialize();
- $this->remixiconModel = new remixiconModel;
- }
-
- public function getList()
- {
- $data = $this->request->param();
- $pageNo = $data['pageNo']??1;
- $pageSize = $data['pageSize']??20;
- $title = $data['title'];
- $where = [];
- if(!empty($title)){
- $where[] = ['icon','LIKE',"%$title%"];
- }
- $list = $this->remixiconModel->where($where)->cache(86400)->paginate(['page'=>$pageNo,'list_rows'=>$pageSize]);
- $list = FieldConverList($list);
- $data = array_column($list['data'],'icon');
- return pageRes(1,"获取成功",$list['total'],$data);
- }
- }
|