开启验证
This commit is contained in:
@@ -246,16 +246,19 @@ class LoginService extends BaseService
|
||||
$user_type = $this->request->input('user_type');
|
||||
$wx_code = $this->request->input('wx_code');
|
||||
|
||||
// $redis = $this->container->get(Redis::class);
|
||||
// // 验证验证码
|
||||
// $sms_code = $redis->get("login_code" . $phone);
|
||||
// if (empty($sms_code)){
|
||||
// return fail(HttpEnumCode::CODE_EXPIRED);
|
||||
// }
|
||||
//
|
||||
// if ($sms_code != $code){
|
||||
// return fail(HttpEnumCode::CODE_ERROR);
|
||||
// }
|
||||
$app_env = config('app_env','dev');
|
||||
if ($app_env != 'dev'){
|
||||
$redis = $this->container->get(Redis::class);
|
||||
// 验证验证码
|
||||
$sms_code = $redis->get("login_code" . $phone);
|
||||
if (empty($sms_code)){
|
||||
return fail(HttpEnumCode::CODE_EXPIRED);
|
||||
}
|
||||
|
||||
if ($sms_code != $code){
|
||||
return fail(HttpEnumCode::CODE_ERROR);
|
||||
}
|
||||
}
|
||||
|
||||
try {
|
||||
$weChat = new Wechat($user_type);
|
||||
|
||||
Reference in New Issue
Block a user