page = $params['page'] ?? $page; $this->pageSize = $params['page_size'] ?? $pageSize; $this->typeId = $params['type_id'] ?? $typeId; $this->plateId = BlogPlateModel::PARTNERS; $this->router_path = $params['router_path'] ?? $routerPath; $this->viewFile = $viewFile; } /** * 合作伙伴列表组件 */ public function render() { $retData['partners'] = BlogRenderFacade::getPublishBlogList( $this->plateId, '', $this->page, $this->pageSize, [], (int)$this->typeId, 0, 'a.id,a.title,a.image_url,a.image_alt' ); $retData['areas'] = BlogRenderFacade::getPublishedTypeList($this->plateId); if (!empty($this->router_path)) { $pageContent = WebFacade::getStaticPageInfo(['route_path' => $this->router_path]); $retData['page_content'] = $pageContent['page_content']; } $retData['menu_data']=WebFacade::getWebMenu(); //dd($retData); return view($this->viewFile, $retData); } }