|
...
|
...
|
@@ -118,7 +118,7 @@ class UserLoginLogic |
|
|
|
public function verifyCode($mobile,$password){
|
|
|
|
//账号密码没通过时,验证验证码
|
|
|
|
$smsModel = new SmsLog();
|
|
|
|
$smsInfo = $smsModel->formatQuery(['mobile'=>$mobile,'type'=>$smsModel::TYPE_LOGIN])->orderBy('id','desc')->first();
|
|
|
|
$smsInfo = $smsModel->formatQuery(['mobile'=>$mobile,'type'=>$smsModel::TYPE_LOGIN])->orderBy('id','desc')->first()->toArray();
|
|
|
|
if(($password != $smsInfo['code']) || ($smsInfo['created_at'] < date('Y-m-d H:i:s',time() - 300))){
|
|
|
|
$this->fail('账号密码错误/验证码错误',Code::USER_REGISTER_ERROE);
|
|
|
|
}
|
...
|
...
|
|