error('错误页面'); } $article = PositionModel::getById($id); if (empty($article)) { return $this->error('无此内容'); } $category = Category::getById($article['category_id']); $description = $category['seo_description'] ?: $this->system['seo_description']; $keywords = $category['seo_keywords'] ?: $this->system['seo_keywords']; $title = $category['seo_title'] ?: $category['title'].' | '.$this->system['seo_title']; $this->setSeo($title, $keywords, $description); $this->data['item'] = $article; $this->data['category'] = $category; $blocks = Block::getByCategoryId($category['id']); $blocks = Block::convertValue($blocks); $this->data['blocks'] = $blocks; $this->data['categoryId'] = $category['id']; $this->data['topCategoryId'] = Category::firstGradeById($category['id']) ; return $this->view('/article/joindata'); } }