123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960 |
- <?php
- namespace app\admin\controller\platform;
- use app\admin\controller\Auth;
- use think\facade\View;
- use think\facade\Request;
- use mall\response\Response;
- use app\admin\service\platform\Dashboard as DashboardService;
- class Index extends Auth {
-
- public function index(){
- return View::fetch("",DashboardService::getData());
- }
-
- public function info(){
- return View::fetch("info",DashboardService::getSystemInfo());
- }
-
- public function cache(){
- if(Request::isAjax()){
- try{
- $type = Request::get("type","","trim,strip_tags");
- if(empty($type)){
- return DashboardService::getCacheList();
- }
- DashboardService::clearCache($type);
- return Response::returnArray("清理缓存成功!",1);
- }catch (\Exception $ex){
- return Response::returnArray($ex->getMessage(),0);
- }
- }
- return View::fetch();
- }
- }
|