Main.php
1.6 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
<?php
namespace app\expert\controller;
use app\common\controller\ExpertBase;
use app\Teacher\model\Teacher;
/**
* 后台首页
* @internal
*/
class Main extends ExpertBase {
protected $layout = '';
/**
* 容器列表
*/
public function index() {
//左侧菜单
$map['level_type'] = 2;
$menulist = [];
$navlist = [];
$action = $this->request->request('action');
if ($this->request->isPost()) {
if ($action == 'refreshmenu') {
$this->success('', null, ['menulist' => $menulist, 'navlist' => $navlist]);
}
}
$fixedmenu= [
"id" => 1,
"type" => "file",
"level_type" => "1",
"pid" => 0,
"name" => "dashboard",
"title" => "控制台",
"icon" => "fa fa-dashboard fa-fw",
"condition" => "",
"remark" => "Dashboard tips",
"ismenu" => 1,
"createtime" => 1602726835,
"updatetime" => 1602726835,
"weigh" => 0,
"status" => "normal",
"url" => "/teacher/dashboard",
"badge" => "",
"py" => "kzt",
"pinyin" => "kongzhitai"
];
$referermenu = [];
$this->view->assign('menulist', $menulist);
$this->view->assign('navlist', $navlist);
$this->view->assign('fixedmenu', $fixedmenu);
$this->view->assign('referermenu', $referermenu);
$this->view->assign('title', __('Home'));
return $this->fetch();
}
}