Commit 955bc2cd authored by hujun's avatar hujun

去除菜单无效的数据

parent 0a072bdc
......@@ -168,10 +168,9 @@ class Auth extends Basic
}
}
//权限表list
/**
* 权限表list
*
* @param int $type
* @return array|false|\PDOStatement|string|\think\Collection|\think\Response
* @throws \think\db\exception\DataNotFoundException
......@@ -179,12 +178,9 @@ class Auth extends Basic
* @throws \think\exception\DbException
*/
public function classList($type=1){
$table=new authRule;
$menus=db('auth_rule')->select();
// exit;
$table = new authRule;
$menus = db('auth_rule')->where('status',0)->select();
$menus =$table->toFormatTree($menus,'title');
// prt($menus);
if($type==1) {
return $this->response(200, '成功', $menus);
}else{
......
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