mirror of
https://gitee.com/zoujingli/ThinkAdmin.git
synced 2025-04-06 03:58:04 +08:00
修改菜单参数问题
This commit is contained in:
parent
7e95f7d5bb
commit
3cc6d26b06
@ -104,7 +104,7 @@ class Menu extends Controller
|
||||
// 选择自己的上级菜单
|
||||
if (empty($vo['pid']) && $this->request->get('pid', '0')) $vo['pid'] = $this->request->get('pid', '0');
|
||||
// 列出可选上级菜单
|
||||
$menus = $this->app->db->name($this->table)->where(['status' => '1'])->order('sort desc,id asc')->column('id,pid,icon,url,title');
|
||||
$menus = $this->app->db->name($this->table)->where(['status' => '1'])->order('sort desc,id asc')->column('id,pid,icon,url,title,params', 'id');
|
||||
$this->menus = DataExtend::arr2table(array_merge($menus, [['id' => '0', 'pid' => '-1', 'url' => '#', 'title' => '顶部菜单']]));
|
||||
if (isset($vo['id'])) foreach ($this->menus as $key => $menu) if ($menu['id'] === $vo['id']) $vo = $menu;
|
||||
foreach ($this->menus as $key => &$menu) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user