|
@@ -110,8 +110,9 @@ class Login extends Controller
|
|
|
Cache::set('sendcode_'.$phone,$code,600);
|
|
|
Cache::set('sendcode_handle_id'.$handle_id, $phone, 600);
|
|
|
$info = send_message::sendSms2UpDate($phone,$code);
|
|
|
+ log::record('验证码发送结果'.$info);
|
|
|
log::record("login() set code => {handle_id: $handle_id \t code: $code \t phone: $phone \t}");
|
|
|
- return json_encode(['status'=>'ok','code'=>'0000','need_code'=> true, 'phone' => $phone, 'handle_id' => $handle_id]);
|
|
|
+ return json_encode(['status'=>'ok','code'=>'0000','need_code'=> true, 'phone' => $check, 'handle_id' => $handle_id]);
|
|
|
}
|
|
|
|
|
|
//医生类
|
|
@@ -152,8 +153,8 @@ class Login extends Controller
|
|
|
if(!$preg){
|
|
|
return false;
|
|
|
}
|
|
|
- $start = substr($preg,0,3);
|
|
|
- $end = substr($preg,6,4);
|
|
|
+ $start = substr($mobile,0,3);
|
|
|
+ $end = substr($mobile,6,4);
|
|
|
$phone = $start.'****'.$end;
|
|
|
return $phone;
|
|
|
}
|
|
@@ -181,7 +182,10 @@ class Login extends Controller
|
|
|
|
|
|
$code = rand('1000','9999');
|
|
|
$info = send_message::sendSms2UpDate($phone,$code);
|
|
|
+ log::record('验证码发送结果'.$info);
|
|
|
$handle_id = $phone.rand('10000000','99999999');
|
|
|
+ log::record('目前的手机号是'.$phone.'存储的缓存为sendcode_handle_id'.$handle_id);
|
|
|
+ log::record('目前的验证码是'.$code.'存储的手机号为sendcode_'.$phone);
|
|
|
Cache::set('sendcode_'.$phone, $code, 600);
|
|
|
Cache::set('sendcode_handle_id'.$handle_id, $phone, 600);
|
|
|
log::record("send_message_again() set code => {handle_id: $handle_id \t code: $code \t phone: $phone \t}");
|
|
@@ -218,6 +222,9 @@ class Login extends Controller
|
|
|
$check_code = Cache::get('sendcode_'.$phone);
|
|
|
|
|
|
if(!empty($check_code) && $code != $check_code) {
|
|
|
+ log::record('当前的手机号是'.$phone.'存储的为sendcode_handle_id'.$handle_id);
|
|
|
+ log::record('当前的验证码是'.$code);
|
|
|
+ log::record('缓存的验证码是'.$check_code.'存储的为sendcode_'.$phone);
|
|
|
return json_encode(['status'=>'fail','code'=>'0090','msg'=>' 错误的验证码']);
|
|
|
}
|
|
|
|