diff --git a/application/controllers/Api/Login.php b/application/controllers/Api/Login.php index 4d73e50..ca19649 100644 --- a/application/controllers/Api/Login.php +++ b/application/controllers/Api/Login.php @@ -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;