Commit 97e07c37 by 冷斌

fix bug

parent 7ca9958e
...@@ -248,6 +248,7 @@ ...@@ -248,6 +248,7 @@
/* 发送验证码 -- 容联云 */ /* 发送验证码 -- 容联云 */
function sendCode($mobile,$code, $tempId){ function sendCode($mobile,$code, $tempId){
echo 1;die;
$rs = array('code' => 0, 'msg' => '', 'info' => array()); $rs = array('code' => 0, 'msg' => '', 'info' => array());
$config = getConfigPri(); $config = getConfigPri();
......
...@@ -161,43 +161,41 @@ class InviteController extends HomebaseController { ...@@ -161,43 +161,41 @@ class InviteController extends HomebaseController {
$rs = array('code' => 0, 'msg' => '发送成功,请注意查收', 'info' => array()); $rs = array('code' => 0, 'msg' => '发送成功,请注意查收', 'info' => array());
// $limit = ip_limit(); $limit = ip_limit();
// if( $limit == 1){ if( $limit == 1){
// $rs['code']=1003; $rs['code']=1003;
// $rs['msg']='您已当日发送次数过多'; $rs['msg']='您已当日发送次数过多';
// $this->ajaxReturn($rs); $this->ajaxReturn($rs);
// } }
//
// $mobile = checkNull(I("mobile")); $mobile = checkNull(I("mobile"));
// $ismobile=checkMobile($mobile); $ismobile=checkMobile($mobile);
// if(!$ismobile){ if(!$ismobile){
// $rs['code']=1001; $rs['code']=1001;
// $rs['msg']='请输入正确的手机号'; $rs['msg']='请输入正确的手机号';
// $this->ajaxReturn($rs); $this->ajaxReturn($rs);
// } }
//
// $where="user_login='{$mobile}'"; $where="user_login='{$mobile}'";
//
// $checkuser = checkUser($where); $checkuser = checkUser($where);
//
// if($checkuser){ if($checkuser){
// $rs['code']=1004; $rs['code']=1004;
// $rs['msg']='该手机号已注册,请登录'; $rs['msg']='该手机号已注册,请登录';
// $this->ajaxReturn($rs); $this->ajaxReturn($rs);
// } }
//
// if($_SESSION['reg_mobile']==$mobile && $_SESSION['reg_mobile_expiretime']> time() ){ if($_SESSION['reg_mobile']==$mobile && $_SESSION['reg_mobile_expiretime']> time() ){
// $rs['code']=1002; $rs['code']=1002;
// $rs['msg']='验证码5分钟有效,请勿多次发送'; $rs['msg']='验证码5分钟有效,请勿多次发送';
// $this->ajaxReturn($rs); $this->ajaxReturn($rs);
// } }
$mobile_code = random(6,1); $mobile_code = random(6,1);
echo "aaaaa"; echo "aaaaa";
//密码可以使用明文密码或使用32位MD5加密 //密码可以使用明文密码或使用32位MD5加密
$result = sendCode($mobile,$mobile_code,630425); $result = sendCode($mobile,$mobile_code,630425);
var_dump($result);
die;
if($result['code']===0){ if($result['code']===0){
$_SESSION['reg_mobile'] = $mobile; $_SESSION['reg_mobile'] = $mobile;
$_SESSION['reg_mobile_code'] = $mobile_code; $_SESSION['reg_mobile_code'] = $mobile_code;
......
...@@ -604,6 +604,7 @@ ...@@ -604,6 +604,7 @@
/* 发送验证码 -- 容联云 */ /* 发送验证码 -- 容联云 */
function sendCode($mobile,$code){ function sendCode($mobile,$code){
echo 2;die;
$rs = array('code' => 0, 'msg' => '', 'info' => array()); $rs = array('code' => 0, 'msg' => '', 'info' => array());
$config = getConfigPri(); $config = getConfigPri();
......
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