1
0
mirror of https://gitee.com/koogua/course-tencent-cloud.git synced 2025-06-30 14:14:55 +08:00
jacky huang 87db0d0569
v.1.2.5 (#21)
* 1:更新ip2region,php-cron-scheduler包
2:替换phpqrcode
3:移除lcobucci/jwt

* 后台接入产品动态,相关链接指向官网

* 升级composer依赖包

* v1.2.5阶段新合并

Co-authored-by: winzer <winzer9527@163.com>
2021-01-21 17:47:40 +08:00

62 lines
1.5 KiB
PHP

<?php
namespace App\Http\Admin\Controllers;
use App\Http\Admin\Services\Index as IndexService;
use Phalcon\Mvc\View;
/**
* @RoutePrefix("/admin")
*/
class IndexController extends Controller
{
/**
* @Get("/", name="admin.index")
*/
public function indexAction()
{
$indexService = new IndexService();
$topMenus = $indexService->getTopMenus();
$leftMenus = $indexService->getLeftMenus();
$appInfo = $indexService->getAppInfo();
$this->view->setRenderLevel(View::LEVEL_ACTION_VIEW);
$this->view->setVar('app_info', $appInfo);
$this->view->setVar('top_menus', $topMenus);
$this->view->setVar('left_menus', $leftMenus);
}
/**
* @Get("/main", name="admin.main")
*/
public function mainAction()
{
$indexService = new IndexService();
$globalStat = $indexService->getGlobalStat();
$todayStat = $indexService->getTodayStat();
$appInfo = $indexService->getAppInfo();
$serverInfo = $indexService->getServerInfo();
$releases = $indexService->getReleases();
$this->view->setVar('global_stat', $globalStat);
$this->view->setVar('today_stat', $todayStat);
$this->view->setVar('app_info', $appInfo);
$this->view->setVar('server_info', $serverInfo);
$this->view->setVar('releases', $releases);
}
/**
* @Get("/phpinfo", name="admin.phpinfo")
*/
public function phpinfoAction()
{
echo phpinfo();
exit;
}
}