Commit 6abb6231 authored by hujun's avatar hujun

数组类型声明

parent 67f392bb
...@@ -97,20 +97,22 @@ class Login extends Basic ...@@ -97,20 +97,22 @@ class Login extends Basic
$nav2[$v->id]=$v; $nav2[$v->id]=$v;
} }
//搜索菜单功能 //搜索菜单功能
$where ="id in({$rules}) and is_menu=0 and status=1 "; $where = "id in({$rules}) and is_menu=0 and status=1 ";
$r= $this->authrule->loginRule($where); $r = $this->authrule->loginRule($where);
$r2=''; $r2 = array();
foreach($r as $v){
$r2[$v->pid][]=$v; foreach($r as $v){
} $r2[$v->pid][] = $v;
}
foreach($nav2 as $k=> $v){ foreach($nav2 as $k=> $v){
if($r2[$k]){ 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::delete("userinfo");
Session::set("userName",$list["name"]); 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