12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879 |
- <?php
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- namespace app\admin\controller;
-
-
- use app\admin\logic\index\StatLogic;
- use app\admin\server\MenuServer;
- use app\common\basics\AdminBase;
- use app\common\model\Role;
- use app\common\server\ConfigServer;
- use app\common\server\JsonServer;
- use think\facade\Config;
-
- class Index extends AdminBase
- {
-
-
- public function index()
- {
- return view('',[
- 'config' => [
- 'name' => ConfigServer::get('website', 'name'),
- 'web_favicon' => ConfigServer::get('website', 'web_favicon'),
- 'backstage_logo' => ConfigServer::get('website_platform', 'platform_admin_logo'),
- ],
- 'menu' => MenuServer::getMenuTree($this->adminUser['role_id']),
- 'view_app_trace' => Config::get('app.app_trace'),
- 'admin_name' => $this->adminUser['name'],
- 'role_name' => (new Role())->getRoleName($this->adminUser['role_id']),
- ]);
- }
-
-
-
- public function stat()
- {
- if($this->request->isAjax()){
- return JsonServer::success('', StatLogic::graphData());
- }
- return view('', [
- 'res' => StatLogic::stat()
- ]);
- }
-
-
-
-
- public function shop()
- {
- if ($this->request->isAjax()) {
- $get = $this->request->get();
- return JsonServer::success('', StatLogic::shopLists($get));
- }
- }
- }
|