正在显示
2 个修改的文件
包含
1 行增加
和
4 行删除
| @@ -132,9 +132,6 @@ class LoginLogic extends BaseLogic | @@ -132,9 +132,6 @@ class LoginLogic extends BaseLogic | ||
| 132 | //账号密码没通过时,验证验证码 | 132 | //账号密码没通过时,验证验证码 |
| 133 | $smsModel = new SmsLog(); | 133 | $smsModel = new SmsLog(); |
| 134 | $smsInfo = $smsModel->formatQuery(['mobile'=>$mobile,'type'=>$smsModel::TYPE_MANAGER_LOGIN])->orderBy('id','desc')->first()->toArray(); | 134 | $smsInfo = $smsModel->formatQuery(['mobile'=>$mobile,'type'=>$smsModel::TYPE_MANAGER_LOGIN])->orderBy('id','desc')->first()->toArray(); |
| 135 | - var_dump($smsInfo['created_at']); | ||
| 136 | - var_dump(date('Y-m-d H:i:s',time() - 300)); | ||
| 137 | - die(); | ||
| 138 | if(($password != $smsInfo['code']) || ($smsInfo['created_at'] < date('Y-m-d H:i:s',time() - 300))){ | 135 | if(($password != $smsInfo['code']) || ($smsInfo['created_at'] < date('Y-m-d H:i:s',time() - 300))){ |
| 139 | $this->fail('账号密码错误/验证码错误',Code::USER_REGISTER_ERROE); | 136 | $this->fail('账号密码错误/验证码错误',Code::USER_REGISTER_ERROE); |
| 140 | } | 137 | } |
| @@ -30,7 +30,7 @@ class SmsLog extends Base | @@ -30,7 +30,7 @@ class SmsLog extends Base | ||
| 30 | */ | 30 | */ |
| 31 | public static function createLog($mobile, $code, $type = self::TYPE_LOGIN, $content = '') | 31 | public static function createLog($mobile, $code, $type = self::TYPE_LOGIN, $content = '') |
| 32 | { | 32 | { |
| 33 | - $created_at = $updated_at = date('Y-m-d H:i:s'); | 33 | + $created_at = $updated_at = date('Y-m-d H:i:s',time()); |
| 34 | $array = compact('type', 'mobile', 'code', 'content', 'updated_at', 'created_at'); | 34 | $array = compact('type', 'mobile', 'code', 'content', 'updated_at', 'created_at'); |
| 35 | return self::insert($array); | 35 | return self::insert($array); |
| 36 | } | 36 | } |
-
请 注册 或 登录 后发表评论