正在显示
3 个修改的文件
包含
6 行增加
和
6 行删除
| @@ -44,7 +44,7 @@ class HrController extends BaseController | @@ -44,7 +44,7 @@ class HrController extends BaseController | ||
| 44 | ],[ | 44 | ],[ |
| 45 | 'id.required' => 'ID不能为空' | 45 | 'id.required' => 'ID不能为空' |
| 46 | ]); | 46 | ]); |
| 47 | - $info = $logic->getHrInfo($this->param['id']); | 47 | + $info = $logic->getHrInfo(); |
| 48 | $info['photo_gallery_link'] = $info['photo_gallery']; | 48 | $info['photo_gallery_link'] = $info['photo_gallery']; |
| 49 | $info['id_card_gallery_link'] = $info['id_card_gallery']; | 49 | $info['id_card_gallery_link'] = $info['id_card_gallery']; |
| 50 | $info['certificate_gallery_link'] = $info['certificate_gallery']; | 50 | $info['certificate_gallery_link'] = $info['certificate_gallery']; |
| @@ -38,7 +38,7 @@ class LoginLogic extends BaseLogic | @@ -38,7 +38,7 @@ class LoginLogic extends BaseLogic | ||
| 38 | */ | 38 | */ |
| 39 | public function login() | 39 | public function login() |
| 40 | { | 40 | { |
| 41 | - $manage = $this->model->select('id', 'name', 'password', 'token', 'status', 'gid', 'dept_id','role') | 41 | + $manage = $this->model->select('id', 'name', 'password', 'token', 'status', 'gid', 'dept_id','manager_id','role') |
| 42 | ->where('mobile', $this->param['mobile'])->first(); | 42 | ->where('mobile', $this->param['mobile'])->first(); |
| 43 | if (!$manage){ | 43 | if (!$manage){ |
| 44 | $this->fail('登录用户名不存在'); | 44 | $this->fail('登录用户名不存在'); |
| @@ -60,16 +60,16 @@ class HrLogic extends BaseLogic | @@ -60,16 +60,16 @@ class HrLogic extends BaseLogic | ||
| 60 | * @method :post | 60 | * @method :post |
| 61 | * @time :2023/7/25 9:27 | 61 | * @time :2023/7/25 9:27 |
| 62 | */ | 62 | */ |
| 63 | - public function getHrInfo($id){ | 63 | + public function getHrInfo(){ |
| 64 | //查看当前用户是否有人事权限 | 64 | //查看当前用户是否有人事权限 |
| 65 | - if($this->manager['gid'] != ManageHr::GID_ZERO){ | 65 | + if(isset($this->param['id']) && ($this->manager['gid'] != ManageHr::GID_ZERO)){ |
| 66 | $groupModel = new Group(); | 66 | $groupModel = new Group(); |
| 67 | $groupInfo = $groupModel->read(['id'=>$this->manager['gid']]); | 67 | $groupInfo = $groupModel->read(['id'=>$this->manager['gid']]); |
| 68 | - if (!in_array(20,$groupInfo['rights']) && ($id != $this->manager['id'])) { | 68 | + if (!in_array(20,$groupInfo['rights']) && ($this->param['id'] != $this->manager['id'])) { |
| 69 | $this->fail('无权限查看其他用户信息'); | 69 | $this->fail('无权限查看其他用户信息'); |
| 70 | } | 70 | } |
| 71 | } | 71 | } |
| 72 | - $data = $this->model->read(['id'=>$id]); | 72 | + $data = $this->model->read($this->param); |
| 73 | foreach ($this->model::specieField() as $v){ | 73 | foreach ($this->model::specieField() as $v){ |
| 74 | $data[$v] = json_decode($data[$v],true); | 74 | $data[$v] = json_decode($data[$v],true); |
| 75 | } | 75 | } |
-
请 注册 或 登录 后发表评论