正在显示
2 个修改的文件
包含
2 行增加
和
7 行删除
| @@ -27,13 +27,7 @@ class RoleLogic extends BaseLogic | @@ -27,13 +27,7 @@ class RoleLogic extends BaseLogic | ||
| 27 | public function role_get_menu(){ | 27 | public function role_get_menu(){ |
| 28 | $menuModel = new ProjectMenuModel(); | 28 | $menuModel = new ProjectMenuModel(); |
| 29 | //根据当前登录用户角色返回用户菜单列表 | 29 | //根据当前登录用户角色返回用户菜单列表 |
| 30 | - if($this->user['role_id'] != 0){ | ||
| 31 | - $info = $this->model->read(['id'=>$this->user['role_id']]); | ||
| 32 | - $info['role_menu'] = trim($info['role_menu'],','); | ||
| 33 | - $lists = $menuModel->where(['status'=>0])->whereIn('id',explode(',',$info['role_menu']))->get()->toArray(); | ||
| 34 | - }else{ | ||
| 35 | - $lists = $menuModel->where(['status'=>0])->get()->toArray(); | ||
| 36 | - } | 30 | + $lists = $menuModel->where(['status'=>0])->get()->toArray(); |
| 37 | $menu = array(); | 31 | $menu = array(); |
| 38 | foreach ($lists as $v){ | 32 | foreach ($lists as $v){ |
| 39 | $v = (array)$v; | 33 | $v = (array)$v; |
| @@ -24,6 +24,7 @@ class VisitLogic extends BaseLogic | @@ -24,6 +24,7 @@ class VisitLogic extends BaseLogic | ||
| 24 | 24 | ||
| 25 | public function getList(array $map = [], array $sort = ['id' => 'desc'], array $columns = ['*'], int $limit = 20) | 25 | public function getList(array $map = [], array $sort = ['id' => 'desc'], array $columns = ['*'], int $limit = 20) |
| 26 | { | 26 | { |
| 27 | + | ||
| 27 | return Logic::getList($map, $sort, ['id', 'url', 'referrer_url', 'device_port', 'country', 'ip', 'depth', 'created_at'], $limit); | 28 | return Logic::getList($map, $sort, ['id', 'url', 'referrer_url', 'device_port', 'country', 'ip', 'depth', 'created_at'], $limit); |
| 28 | } | 29 | } |
| 29 | 30 |
-
请 注册 或 登录 后发表评论