Commit 4c7ed1ea by 冷斌

fix bug

parent 0566a5b0
......@@ -386,22 +386,24 @@ class Api_Login extends PhalApi_Api {
return $rs;
}
if($_SESSION['reg_mobile']==$mobile && $_SESSION['reg_mobile_expiretime']> time() ){
$rs['code']=1002;
$rs['msg']='验证码5分钟有效,请勿多次发送';
return $rs;
}
$limit = ip_limit();
if( $limit == 1){
$rs['code']=1003;
$rs['msg']='您已当日发送次数过多';
return $rs;
}
// if($_SESSION['reg_mobile']==$mobile && $_SESSION['reg_mobile_expiretime']> time() ){
// $rs['code']=1002;
// $rs['msg']='验证码5分钟有效,请勿多次发送';
// return $rs;
// }
//
// $limit = ip_limit();
// if( $limit == 1){
// $rs['code']=1003;
// $rs['msg']='您已当日发送次数过多';
// return $rs;
// }
$mobile_code = random(6,1);
var_dump($mobile,$mobile_code, 630134);
/* 发送验证码 */
$result=sendCode($mobile,$mobile_code);
$result=sendCode($mobile,$mobile_code, 630134);
if($result['code']==0){
$_SESSION['reg_mobile'] = $mobile;
$_SESSION['reg_mobile_code'] = $mobile_code;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment