从数据库中生成菜单

This commit is contained in:
邹景立 2017-02-13 18:08:12 +08:00
parent 021d983583
commit bc84d1bb27
2 changed files with 3 additions and 5 deletions

View File

@ -52,9 +52,7 @@ class Menu extends BasicAdmin {
*/ */
protected function _index_data_filter(&$data) { protected function _index_data_filter(&$data) {
foreach ($data as &$vo) { foreach ($data as &$vo) {
if ($vo['url'] !== '#') { ($vo['url'] !== '#') && ($vo['url'] = url($vo['url']));
$vo['url'] = url($vo['url']);
}
$vo['ids'] = join(',', Tools::getArrSubIds($data, $vo['id'])); $vo['ids'] = join(',', Tools::getArrSubIds($data, $vo['id']));
} }
$data = Tools::arr2table($data); $data = Tools::arr2table($data);