Merge remote-tracking branch 'origin/master' into akun
正在显示
2 个修改的文件
包含
4 行增加
和
1 行删除
| @@ -67,6 +67,9 @@ class UserLogic extends BaseLogic | @@ -67,6 +67,9 @@ class UserLogic extends BaseLogic | ||
| 67 | $this->param['password'] = base64_encode(md5($this->param['password'] ?? '123456')); | 67 | $this->param['password'] = base64_encode(md5($this->param['password'] ?? '123456')); |
| 68 | $rs = $this->model->add($this->param); | 68 | $rs = $this->model->add($this->param); |
| 69 | } | 69 | } |
| 70 | + if(isset($this->param['is_password'])){ | ||
| 71 | + $this->model->edit(['is_password'=>$this->param['is_password']],['mobile'=>$this->param['mobile']]); | ||
| 72 | + } | ||
| 70 | if ($rs === false) { | 73 | if ($rs === false) { |
| 71 | $this->fail('添加失败'); | 74 | $this->fail('添加失败'); |
| 72 | } | 75 | } |
| @@ -37,7 +37,7 @@ class UserLoginLogic | @@ -37,7 +37,7 @@ class UserLoginLogic | ||
| 37 | */ | 37 | */ |
| 38 | public function login(){ | 38 | public function login(){ |
| 39 | //先验证手机号是否在项目中存在 | 39 | //先验证手机号是否在项目中存在 |
| 40 | - $info = $this->model->read(['mobile'=>$this->param['mobile'],'status'=>$this->model::STATUS_ZERO],['id','is_password','project_id']); | 40 | + $info = $this->model->list(['mobile'=>$this->param['mobile'],'status'=>$this->model::STATUS_ZERO],['id','is_password']); |
| 41 | if($info === false){ | 41 | if($info === false){ |
| 42 | $this->fail('当前用户不存在或者被禁用',Code::USER_REGISTER_ERROE); | 42 | $this->fail('当前用户不存在或者被禁用',Code::USER_REGISTER_ERROE); |
| 43 | } | 43 | } |
-
请 注册 或 登录 后发表评论