[更新]修正节点出现下划线时的bug #50

This commit is contained in:
Anyon 2017-09-20 14:58:47 +08:00
parent 6d6c006442
commit ac1d208534

View File

@ -63,7 +63,7 @@ class Index extends BasicAdmin
continue; continue;
// 菜单链接不为空时,判断登录状态及权限验证 // 菜单链接不为空时,判断登录状态及权限验证
elseif ($menu['url'] !== '#') : elseif ($menu['url'] !== '#') :
$node = join('/', array_slice(explode('/', preg_replace('/[\W^_]/', '/', $menu['url'])), 0, 3)); $node = join('/', array_slice(explode('/', preg_replace('/[\W]/', '/', $menu['url'])), 0, 3));
$menu['url'] = url($menu['url']); $menu['url'] = url($menu['url']);
// 节点需要验证验证,未登录时移除此菜单 // 节点需要验证验证,未登录时移除此菜单
if (isset($nodes[$node]) && $nodes[$node]['is_login'] && !session('user')) : if (isset($nodes[$node]) && $nodes[$node]['is_login'] && !session('user')) :