|
...
|
...
|
@@ -27,13 +27,7 @@ class RoleLogic extends BaseLogic |
|
|
|
public function role_get_menu(){
|
|
|
|
$menuModel = new ProjectMenuModel();
|
|
|
|
//根据当前登录用户角色返回用户菜单列表
|
|
|
|
if($this->user['role_id'] != 0){
|
|
|
|
$info = $this->model->read(['id'=>$this->user['role_id']]);
|
|
|
|
$info['role_menu'] = trim($info['role_menu'],',');
|
|
|
|
$lists = $menuModel->where(['status'=>0])->whereIn('id',explode(',',$info['role_menu']))->get()->toArray();
|
|
|
|
}else{
|
|
|
|
$lists = $menuModel->where(['status'=>0])->get()->toArray();
|
|
|
|
}
|
|
|
|
$menu = array();
|
|
|
|
foreach ($lists as $v){
|
|
|
|
$v = (array)$v;
|
...
|
...
|
|