You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
69 lines
1.6 KiB
69 lines
1.6 KiB
<?php
|
|
|
|
namespace app\index\controller\wanlshop;
|
|
|
|
use app\common\controller\Wanlshop;
|
|
|
|
/**
|
|
* 图标管理
|
|
*
|
|
* @icon fa fa-circle-o
|
|
*/
|
|
class Icon extends Wanlshop
|
|
{
|
|
protected $noNeedLogin = '*';
|
|
protected $noNeedRight = '*';
|
|
/**
|
|
* Icon模型对象
|
|
* @var \app\admin\model\wanlshop\Icon
|
|
*/
|
|
protected $model = null;
|
|
|
|
public function _initialize()
|
|
{
|
|
parent::_initialize();
|
|
$this->model = new \app\index\model\wanlshop\Icon;
|
|
$this->view->assign("statusList", $this->model->getStatusList());
|
|
}
|
|
|
|
/**
|
|
* 查看
|
|
*/
|
|
public function index()
|
|
{
|
|
//当前是否为关联查询
|
|
$this->relationSearch = true;
|
|
//设置过滤方法
|
|
$this->request->filter(['strip_tags']);
|
|
if ($this->request->isAjax()) {
|
|
list($where, $sort, $order, $offset, $limit) = $this->buildparams();
|
|
$total = $this->model
|
|
->where($where)
|
|
->order($sort, $order)
|
|
->count();
|
|
|
|
$list = $this->model
|
|
->where($where)
|
|
->order($sort, $order)
|
|
->limit($offset, $limit)
|
|
->select();
|
|
|
|
$list = collection($list)->toArray();
|
|
|
|
$result = array("total" => $total, "rows" => $list);
|
|
return json($result);
|
|
}
|
|
return $this->view->fetch();
|
|
}
|
|
|
|
/**
|
|
* 选择链接
|
|
*/
|
|
public function select()
|
|
{
|
|
if ($this->request->isAjax()) {
|
|
return $this->index();
|
|
}
|
|
return $this->view->fetch();
|
|
}
|
|
}
|
|
|