修改类别

This commit is contained in:
win10 committed 2020-02-07 16:20:19 +08:00
1 parent a874c0975b
commit ccb37ed51d
2 files changed
+7 -33

No files matched your search

+1 -4
View File
@@ -76,10 +76,7 @@ class AuthGroup extends BaseController
$rule = new \app\admin\model\AuthRule;
$ruleList = $rule->srcChildren();
halt($ruleList);
$ruleList = $rule->srcStatus();
// 模板赋值
$this->view->assign('list',$list);
+6 -29
View File
@@ -43,35 +43,12 @@ class AuthRule extends Base
// 递归权限
public function srcChildren($arr=array())
public function srcStatus()
{
if(count($arr)==0 && $pid==0)
{
$arr = $this->where('pid',0)
->where('status',1)
->field('id,name,title,condition,paixu,ismenu,url,pid,type')
->select()
->toArray();
}
$getArr = array();
foreach ($arr as $key => $value) {
$temp = $this->where('pid',$value['pid'])
->where('status',1)
->field('id,name,title,condition,paixu,ismenu,url,pid,type')
->select()
->toArray();
if(count($temp)>0)
{
// $getArr['pid'] = $this->srcChildren($temp,$value['pid']);
}else{
// $getArr['pid'] = $temp;
}
}
$getArr[$value['pid']] = $temp;
return $getArr;
$data = $this->where('status',1)
->field('id,name,title,condition,paixu,ismenu,url,pid,type')
->select()
->toArray();
return $data;
}
}