mirror of
https://gitee.com/zoujingli/ThinkAdmin.git
synced 2025-04-06 03:58:04 +08:00
[更新]设置系统菜单允许带参数
This commit is contained in:
parent
44efd72720
commit
84ef9699b5
@ -65,7 +65,7 @@ class Index extends BasicAdmin
|
||||
continue;
|
||||
} elseif ($menu['url'] !== '#') {
|
||||
$node = join('/', array_slice(explode('/', preg_replace('/[\W]/', '/', $menu['url'])), 0, 3));
|
||||
$menu['url'] = url($menu['url']);
|
||||
$menu['url'] = url($menu['url']) . (empty($menu['params']) ? '' : "?{$menu['params']}");
|
||||
if (isset($nodes[$node]) && $nodes[$node]['is_login'] && empty($isLogin)) {
|
||||
unset($menus[$key]);
|
||||
} elseif (isset($nodes[$node]) && $nodes[$node]['is_auth'] && $isLogin && !auth($node)) {
|
||||
|
@ -58,7 +58,9 @@ class Menu extends BasicAdmin
|
||||
protected function _index_data_filter(&$data)
|
||||
{
|
||||
foreach ($data as &$vo) {
|
||||
($vo['url'] !== '#') && ($vo['url'] = url($vo['url']));
|
||||
if ($vo['url'] !== '#') {
|
||||
$vo['url'] = url($vo['url']) . (empty($vo['params']) ? '' : "?{$vo['params']}");
|
||||
}
|
||||
$vo['ids'] = join(',', ToolsService::getArrSubIds($data, $vo['id']));
|
||||
}
|
||||
$data = ToolsService::arr2table($data);
|
||||
|
@ -29,6 +29,14 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">链接参数</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" name="params" autocomplete="off" title="请输入链接参数" placeholder="请输入链接参数" value="{$vo.params|default=''}" class="layui-input typeahead">
|
||||
<p class="help-block">(可选)设置菜单链接参数,如:name=1&age=3</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">菜单图标</label>
|
||||
<div class="layui-input-inline" style='width:300px'>
|
||||
|
Loading…
x
Reference in New Issue
Block a user