page = $params['page'] ?? $page; $this->pageSize = $params['page_size'] ?? $pageSize; $this->typeId = $params['type_id'] ?? $typeId; $this->router_path = $params['router_path'] ?? $routerPath; $this->plateId = BlogPlateModel::KNOWLEDGECENTRE; $this->viewFile = $viewFile; } /** * 知识中心列表组件 */ public function render() { $retData['train_list'] = []; $recommend = BlogRenderFacade::getPublishBlogList( $this->plateId, '', $this->page, $this->pageSize, ['pub_date'], (int)$this->typeId, 0, 'a.id,a.title,a.image_url,a.image_alt,a.pub_date,a.author,a.total_view,b.urla' ); if(!empty($recommend['data'])) { $retData = $recommend; } if (!empty($this->router_path)) { $pageContent = WebFacade::getStaticPageInfo(['route_path' => $this->router_path]); $retData['page_content'] = $pageContent['page_content']; } $retData['menu_data']=WebFacade::getWebMenu(); return view($this->viewFile, $retData); } }