model=new AdminMenu(); } public function list(){ $param = $this->request->param(["relaComNo"=>"","level"=>""],"post","trim"); $condition = [ ['status','=',1], ['is_display','=',1], ['is_del','=',0] ]; $action = \app\admin\model\UserRole::getAllAction($this->uid,$param['relaComNo'],$this->level); if(isset($param['level']) && $param['level'] !== '') $condition[] = ['level','in',[0,$param['level']]]; else { if($this->level == 1) $condition[] = ['level','in',[0,1,2]]; else $condition[] = ['level','in',[0,$this->level]]; } $list=$this->model->GetMenuByActionArr($action,$condition); return success("获取成功",$list); } public function GetMenuAction(){ $param = $this->request->param(["level"=>""],"post","trim"); $condition=[["status","=",1],["is_del","=",0]]; // if(isset($param['level']) && $param['level'] !== '') $condition[] = ['level','in',[0,$param['level']]]; $list=$this->model->GetMenuActionTree(); return success('获取成功',$list); } }