first commit
This commit is contained in:
@@ -0,0 +1,49 @@
|
||||
<?php
|
||||
/*
|
||||
* 首页
|
||||
* */
|
||||
|
||||
namespace app\admin\controller;
|
||||
|
||||
|
||||
use app\admin\controller\AdminController;
|
||||
use think\facade\Cache;
|
||||
use think\facade\Request;
|
||||
|
||||
|
||||
class Index extends AdminController {
|
||||
|
||||
/**
|
||||
* 首页
|
||||
* @return mixed
|
||||
*/
|
||||
public function index() {
|
||||
Cache::remember('Home', function () {
|
||||
|
||||
return model('menu')->getHome();
|
||||
});
|
||||
$apimenu = new \app\admin\controller\api\Menu();
|
||||
|
||||
$sys_info = Cache::get('SysInfo');
|
||||
|
||||
$basic_data = [
|
||||
'title' => $sys_info['ManageName'],
|
||||
'nav' => $apimenu->getNav(),
|
||||
'home' => Cache::get('Home'),
|
||||
'data' => '',
|
||||
];
|
||||
return $this->fetch('', $basic_data);
|
||||
}
|
||||
|
||||
/**
|
||||
* 首页欢迎界面
|
||||
* @return mixed
|
||||
*/
|
||||
public function welcome() {
|
||||
|
||||
$basic_data = [
|
||||
'quick_nav' => \app\admin\model\Nav::getQuickNav(),
|
||||
];
|
||||
return $this->fetch('', $basic_data);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user