Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
数据应用
ThinkLibrary
提交
1462b4b1
T
ThinkLibrary
项目概览
数据应用
/
ThinkLibrary
通知
2
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
代码片段
项目成员
Pages
T
ThinkLibrary
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
1462b4b1
编写于
4月 15, 2020
作者:
李光春
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
- 增加菜单和当前URL
上级
d63d107e
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
166 addition
and
0 deletion
+166
-0
src/Controller.php
src/Controller.php
+166
-0
未找到文件。
src/Controller.php
浏览文件 @
1462b4b1
...
...
@@ -39,6 +39,18 @@ class Controller extends \stdClass
*/
public
$request
;
/**
* 当前URL
* @var
*/
protected
$currentUrl
;
/**
* 菜单
* @var array
*/
protected
$meuns
;
/**
* Controller constructor.
* @param App $app
...
...
@@ -47,10 +59,164 @@ class Controller extends \stdClass
{
$this
->
app
=
$app
;
$this
->
request
=
$app
->
request
;
$this
->
currentUrl
=
$this
->
request
->
url
();
$this
->
meuns
=
[
[
"id"
=>
2
,
"pid"
=>
0
,
"title"
=>
"系统管理"
,
"icon"
=>
"layui-icon layui-icon-set"
,
"node"
=>
""
,
"url"
=>
"#"
,
"params"
=>
""
,
"target"
=>
"_self"
,
"sort"
=>
1000
,
"status"
=>
1
,
"create_at"
=>
"2018-09-06 02:04:52"
,
"sub"
=>
[
[
"id"
=>
4
,
"pid"
=>
2
,
"title"
=>
"系统配置"
,
"icon"
=>
""
,
"node"
=>
""
,
"url"
=>
"#"
,
"params"
=>
""
,
"target"
=>
"_self"
,
"sort"
=>
20
,
"status"
=>
1
,
"create_at"
=>
"2018-09-06 02:07:17"
,
"sub"
=>
[
[
"id"
=>
11
,
"pid"
=>
4
,
"title"
=>
"系统参数配置"
,
"icon"
=>
"layui-icon layui-icon-set"
,
"node"
=>
""
,
"url"
=>
"/admin/config/index.html"
,
"params"
=>
""
,
"target"
=>
"_self"
,
"sort"
=>
4
,
"status"
=>
1
,
"create_at"
=>
"2018-09-07 00:43:47"
,
],
[
"id"
=>
27
,
"pid"
=>
4
,
"title"
=>
"系统任务管理"
,
"icon"
=>
"layui-icon layui-icon-log"
,
"node"
=>
""
,
"url"
=>
"/admin/queue/index.html"
,
"params"
=>
""
,
"target"
=>
"_self"
,
"sort"
=>
3
,
"status"
=>
1
,
"create_at"
=>
"2018-11-29 19:13:34"
,
],
[
"id"
=>
49
,
"pid"
=>
4
,
"title"
=>
"系统日志管理"
,
"icon"
=>
"layui-icon layui-icon-form"
,
"node"
=>
""
,
"url"
=>
"/admin/oplog/index.html"
,
"params"
=>
""
,
"target"
=>
"_self"
,
"sort"
=>
2
,
"status"
=>
1
,
"create_at"
=>
"2019-02-18 20:56:56"
,
],
[
"id"
=>
3
,
"pid"
=>
4
,
"title"
=>
"系统菜单管理"
,
"icon"
=>
"layui-icon layui-icon-layouts"
,
"node"
=>
""
,
"url"
=>
"/admin/menu/index.html"
,
"params"
=>
""
,
"target"
=>
"_self"
,
"sort"
=>
1
,
"status"
=>
1
,
"create_at"
=>
"2018-09-06 02:05:26"
,
]
]
],
[
"id"
=>
4
,
"pid"
=>
2
,
"title"
=>
"系统配置"
,
"icon"
=>
""
,
"node"
=>
""
,
"url"
=>
"#"
,
"params"
=>
""
,
"target"
=>
"_self"
,
"sort"
=>
20
,
"status"
=>
1
,
"create_at"
=>
"2018-09-06 02:07:17"
,
"sub"
=>
[
[
"id"
=>
11
,
"pid"
=>
4
,
"title"
=>
"系统参数配置"
,
"icon"
=>
"layui-icon layui-icon-set"
,
"node"
=>
""
,
"url"
=>
"/admin/config/index.html"
,
"params"
=>
""
,
"target"
=>
"_self"
,
"sort"
=>
4
,
"status"
=>
1
,
"create_at"
=>
"2018-09-07 00:43:47"
,
],
[
"id"
=>
27
,
"pid"
=>
4
,
"title"
=>
"系统任务管理"
,
"icon"
=>
"layui-icon layui-icon-log"
,
"node"
=>
""
,
"url"
=>
"/admin/queue/index.html"
,
"params"
=>
""
,
"target"
=>
"_self"
,
"sort"
=>
3
,
"status"
=>
1
,
"create_at"
=>
"2018-11-29 19:13:34"
,
],
[
"id"
=>
49
,
"pid"
=>
4
,
"title"
=>
"系统日志管理"
,
"icon"
=>
"layui-icon layui-icon-form"
,
"node"
=>
""
,
"url"
=>
"/admin/oplog/index.html"
,
"params"
=>
""
,
"target"
=>
"_self"
,
"sort"
=>
2
,
"status"
=>
1
,
"create_at"
=>
"2019-02-18 20:56:56"
,
],
[
"id"
=>
3
,
"pid"
=>
4
,
"title"
=>
"系统菜单管理"
,
"icon"
=>
"layui-icon layui-icon-layouts"
,
"node"
=>
""
,
"url"
=>
"/admin/menu/index.html"
,
"params"
=>
""
,
"target"
=>
"_self"
,
"sort"
=>
1
,
"status"
=>
1
,
"create_at"
=>
"2018-09-06 02:05:26"
,
]
]
]
]
]
];
$this
->
app
->
bind
(
'DtApp\ThinkLibrary\Controller'
,
$this
);
if
(
in_array
(
$this
->
request
->
action
(),
get_class_methods
(
__CLASS__
)))
{
$this
->
error
(
'Access without permission.'
);
}
$this
->
assign
(
'currentUrl'
,
$this
->
currentUrl
);
$this
->
assign
(
'meuns'
,
$this
->
meuns
);
$this
->
initialize
();
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录