This repository has been archived on 2024-07-11. You can view files and clone it, but cannot push or open issues or pull requests.
yoshop/source/application/store/controller/Index.php
2020-04-25 22:20:29 +08:00

33 lines
673 B
PHP

<?php
namespace app\store\controller;
use app\store\model\Store as StoreModel;
/**
* 后台首页
* Class Index
* @package app\store\controller
*/
class Index extends Controller
{
/**
* 后台首页
* @return mixed
* @throws \think\Exception
* @throws \think\exception\DbException
*/
public function index()
{
// 当前用户菜单url
$menus = $this->menus();
$url = current(array_values($menus))['index'];
if ($url !== 'index/index') {
$this->redirect($url);
}
$model = new StoreModel;
return $this->fetch('index', ['data' => $model->getHomeData()]);
}
}