coupon-admin/app/controller/About.php

35 lines
863 B
PHP

<?php
namespace app\controller;
use app\repository\OperationRepository;
use Exception;
use think\response\View;
use think\response\Redirect;
use app\repository\CmsRepository;
use app\repository\BlockRepository;
use think\db\exception\DbException;
use think\db\exception\DataNotFoundException;
use think\db\exception\ModelNotFoundException;
class About extends Base
{
/**
* 列表页
*
* @return Redirect|View
* @throws DataNotFoundException
* @throws DbException
* @throws ModelNotFoundException
* @throws Exception
*/
public function index()
{
$this->setSeo();
$about = CmsRepository::getInstance()->getAbout($this->aboutCategory['id']);
$this->data['about'] = $about;
$this->data['category'] = $this->aboutCategory;
return $this->view();
}
}