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.
37 lines
931 B
37 lines
931 B
2 years ago
|
<?php
|
||
|
|
||
|
namespace app\api\controller;
|
||
|
|
||
|
use app\api\library\buiapi\Api;
|
||
|
|
||
|
class WxMenu extends Api{
|
||
|
|
||
|
protected $model = null;
|
||
|
|
||
|
protected $noNeedRight = '*';
|
||
|
protected $noNeedLogin = ['*'];
|
||
|
protected $_allow_func = ['index'];
|
||
|
|
||
|
|
||
|
use \app\api\library\buiapi\traits\Api;
|
||
|
|
||
|
public function _initialize(){
|
||
|
parent::_initialize();
|
||
|
$this->model = new \app\api\model\WxMenu;
|
||
|
}
|
||
|
|
||
|
|
||
|
public function index()
|
||
|
{
|
||
|
$this->relationSearch = true;
|
||
|
$this->request->filter('trim,strip_tags,xss_clean');
|
||
|
list($where, $sort, $order, $offset, $limit) = $this->buildparams();
|
||
|
$item = $this->model->where($where)->where(['catedata'=>1])->where($this->_init_where)->order($sort, $order);
|
||
|
if (!empty($this->_index_field)) {
|
||
|
$item->field($this->_index_field);
|
||
|
}
|
||
|
$list = $this->__handle_index__($item->paginate($limit));
|
||
|
$this->success('数据列表', $list);
|
||
|
}
|
||
|
|
||
|
}
|