解决更高数据库版本的情况下,在获取菜单时group字段数据库查询错误

This commit is contained in:
2018-04-16 21:46:33 +08:00
parent 1bc4550c35
commit 8087c74a13

View File

@@ -152,7 +152,7 @@ class Admin extends Base {
$map['pid'] = $pid;
$map['hide'] = 0;
$map['type'] = 'admin';
$row = db('menu')->field('id,title,url,icon,group,pid,"" as style')->where($map)->order('sort asc')->select();
$row = db('menu')->field("id,title,url,icon,`group`,pid,'' as style")->where($map)->order('sort asc')->select();
foreach ($row as $key => $value) {
if (IS_ROOT || $this->checkRule($value['url'], 2, null)) {
if ($controller == $value['url']) {