|
...
|
...
|
@@ -74,7 +74,7 @@ class UserLogic extends BaseLogic |
|
|
|
}
|
|
|
|
$this->param['type'] = 1;
|
|
|
|
$this->param['operator_id'] = $this->user['id'];
|
|
|
|
$this->edits($this->param);
|
|
|
|
$this->edits();
|
|
|
|
return $this->success();
|
|
|
|
}
|
|
|
|
|
|
...
|
...
|
@@ -116,20 +116,24 @@ class UserLogic extends BaseLogic |
|
|
|
* @method :post
|
|
|
|
* @time :2023/6/17 16:41
|
|
|
|
*/
|
|
|
|
public function edits($param){
|
|
|
|
//查看密码是否修改
|
|
|
|
$info = $this->model->read(['id'=>$param['id']]);
|
|
|
|
$param['password'] = base64_encode(md5($param['password']));
|
|
|
|
if($param['password'] == $info['password']){
|
|
|
|
unset($param['password']);
|
|
|
|
public function edits(){
|
|
|
|
if(!isset($this->param['password']) || empty($this->param['password'])){
|
|
|
|
unset($this->param['password']);
|
|
|
|
}else{
|
|
|
|
$this->param['password'] = base64_encode(md5($this->param['password']));
|
|
|
|
}
|
|
|
|
$info = $this->model->read(['mobile'=>$this->param['mobile'],
|
|
|
|
'project_id'=>$this->user['project_id'],'id'=>['!=',$this->param['id']]]);
|
|
|
|
if($info !== false){
|
|
|
|
$this->fail('当前手机号码已注册');
|
|
|
|
}
|
|
|
|
//密码加密
|
|
|
|
$rs = $this->model->edit($param,['id'=>$param['id']]);
|
|
|
|
$rs = $this->model->edit($this->param,['id'=>$this->param['id']]);
|
|
|
|
if($rs === false){
|
|
|
|
$this->fail('系统错误,请联系管理员');
|
|
|
|
}
|
|
|
|
//清空当前用户登录缓存
|
|
|
|
Cache::pull($info['token']);
|
|
|
|
Cache::pull($this->user['token']);
|
|
|
|
return $this->success();
|
|
|
|
}
|
|
|
|
} |
...
|
...
|
|