|
|
|
@ -179,7 +179,7 @@ |
|
|
|
|
$username = empty($this->POST['username'])||!isset($this->POST['username'])? Tool_Fnc::apiMsg('请输入账号', '500'):Tool_fnc::safe_string($this->POST['username']); |
|
|
|
|
$smsModel = new SmscodeModel(); |
|
|
|
|
$userinfo = $this->Usermodel->field('id')->where("phone='{$phone}' and is_delete=0 and username='{$username}' and status=1")->fRow(); |
|
|
|
|
if(empty($codedata))Tool_Fnc::apiMsg('账号不存在', '500'); |
|
|
|
|
if(empty($userinfo))Tool_Fnc::apiMsg('账号不存在', '500'); |
|
|
|
|
$codedata = $smsModel->field('id')->where("phone='{$phone}' and code='{$code}' and username='{$username}' and status=0")->fRow(); |
|
|
|
|
if(empty($codedata))Tool_Fnc::apiMsg('验证码不正确', '500'); |
|
|
|
|
$codedata['status']=1; |
|
|
|
|