22 lines
604 B
PHP
22 lines
604 B
PHP
<?php
|
|
|
|
namespace app\controller;
|
|
|
|
use app\service\Pdf;
|
|
use app\model\{Category, Block, Slide};
|
|
use think\facade\View;
|
|
|
|
class Index extends Base
|
|
{
|
|
public function index()
|
|
{
|
|
$category = Category::getIndex();
|
|
$categoryId = $category['id'] ?? 0;
|
|
$this->data['categoryId'] = $categoryId;
|
|
$this->setSeo($this->system['seo_title'], $this->system['seo_keywords'], $this->system['seo_description']);
|
|
$this->data['blocks'] = Block::getByCategoryId($categoryId);
|
|
View::assign("category", $category);
|
|
|
|
return $this->view();
|
|
}
|
|
} |