params['page'] ?? 1; $page_size = $this->params['page_size'] ?? PAGE_LIST_ROWS; $search_text = $this->params['search_text'] ?? ''; $condition = array ( [ 'site_id', '=', $this->site_id ], ); if (!empty($search_text)) { $condition[] = [ 'category_name', 'like', '%' . $search_text . '%' ]; } $category_model = new CategoryModel(); $list = $category_model->getPageList($condition, $page, $page_size); return $this->response($list); } }