Commit 6abb6231 authored by hujun's avatar hujun

数组类型声明

parent 67f392bb
......@@ -97,20 +97,22 @@ class Login extends Basic
$nav2[$v->id]=$v;
}
//搜索菜单功能
$where ="id in({$rules}) and is_menu=0 and status=1 ";
$r= $this->authrule->loginRule($where);
$r2='';
foreach($r as $v){
$r2[$v->pid][]=$v;
}
$where = "id in({$rules}) and is_menu=0 and status=1 ";
$r = $this->authrule->loginRule($where);
$r2 = array();
foreach($r as $v){
$r2[$v->pid][] = $v;
}
foreach($nav2 as $k=> $v){
if($r2[$k]){
$nav2[$k]['cz']=$r2[$k];
$nav2[$k]['cz'] = $r2[$k];
}
}
$list['nav']=$nav2;
$list2= $list->toArray();//转化arr
$list['nav'] = $nav2;
$list2 = $list->toArray();//转化arr
}
// Session::delete("userinfo");
Session::set("userName",$list["name"]);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment