作者 lyh

gx

... ... @@ -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;
... ...
... ... @@ -24,6 +24,7 @@ class VisitLogic extends BaseLogic
public function getList(array $map = [], array $sort = ['id' => 'desc'], array $columns = ['*'], int $limit = 20)
{
return Logic::getList($map, $sort, ['id', 'url', 'referrer_url', 'device_port', 'country', 'ip', 'depth', 'created_at'], $limit);
}
... ...