params['page'] ?? 1; $limit = $this->params['page_size'] ?? PAGE_LIST_ROWS; $condition = []; $receiving_type = $this->params['receiving_type'] ?? 'shop'; if ($receiving_type) { $condition[] = [ 'receiving_type', 'like', '%' . $receiving_type . '%' ]; } $notice = new NoticeModel(); $list = $notice->getNoticePageList($condition, $page, $limit); return $this->response($list); } public function detail() { $id = $this->params['id'] ?? 0; $notice = new NoticeModel(); $info = $notice->getNoticeInfo([ [ 'id', '=', $id ] ]); return $this->response($info); } }