model = new \app\api\model\WxAdv; } 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(['advdata'=>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); } }