|
@@ -84,14 +84,14 @@ class Login extends Auth
|
|
|
'verify.require' => '验证码不能为空!',
|
|
|
'password.require' => '登录密码不能为空!',
|
|
|
]);
|
|
|
-
|
|
|
- if (!MessageService::instance()->checkCode($data['verify'], $data['phone'],2)) {
|
|
|
- $this->error('手机短信验证失败!');
|
|
|
- }
|
|
|
+
|
|
|
$map = ['phone' => $data['phone'], 'deleted' => 0];
|
|
|
if (DataUser::mk()->where($map)->count() > 0) {
|
|
|
$this->error('手机号已注册,请使用其它手机号!');
|
|
|
}
|
|
|
+ if (!MessageService::instance()->checkCode($data['verify'], $data['phone'],2)) {
|
|
|
+ $this->error('手机短信验证失败!');
|
|
|
+ }
|
|
|
$data['password'] = md5($data['password']);
|
|
|
$user = UserAdminService::set($map, $data, $this->type, true);
|
|
|
$huanxinID = 'cbz_'.$user['id'];
|