1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950 |
- <?php
- namespace app\admin\controller\base\other;
- /**
- * @title:vue-admin-beautiful使用的图标
- * @Description:
- * @Author: goldenrock 112049337@qq.com
- * @Date: 2024-08-24 09:40:45
- * @LastEditTime: 2024-09-23 15:30:48
- * @LastEditors: goldenrock 112049337@qq.com
- * @FilePath: \OA_hbdrwhe:\HBDRWHCODE\DRSERVER_dev\app\admin\controller\base\other\Remixicon.php
- */
- 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;
- }
- /**
- * @title: 图标列表
- * @param {int} {pageNo} {非必填,默认值为1} {页码}
- * @param {int} {pageSize} {非必填,默认值为10} {每页数量}
- * @param {string} {title} {非必填} {名称字段搜索}
- * @return array
- * @Author: wangkewei
- * @Date: 2021/5/18 9:33
- */
- 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);
- }
- }
|