...
|
...
|
@@ -56,7 +56,7 @@ class BindController extends AbstractAction |
|
|
$nickname = $this->get('nickname');
|
|
|
$areaCode = $this->get('areaCode', '86');
|
|
|
$isReg = $this->get('isReg');
|
|
|
$mobile=$this->get('mobile');
|
|
|
$phoneNum=$this->get('phoneNum');
|
|
|
|
|
|
$data = array(
|
|
|
'bindIndex'=>true,//js标识
|
...
|
...
|
@@ -68,7 +68,7 @@ class BindController extends AbstractAction |
|
|
'nickname' => $nickname, //昵称
|
|
|
'isReg' => $isReg, //是否是已注册过的手机号
|
|
|
'areaCode' => $areaCode, //国别码
|
|
|
'phoneNum'=>$mobile,//手机号码
|
|
|
'phoneNum'=>$phoneNum,//手机号码
|
|
|
);
|
|
|
|
|
|
// 渲染模板
|
...
|
...
|
@@ -114,31 +114,31 @@ class BindController extends AbstractAction |
|
|
break;
|
|
|
}
|
|
|
|
|
|
$mobile = $this->post('mobile');
|
|
|
$phoneNum = $this->post('phoneNum');
|
|
|
$openId = $this->post('openId');
|
|
|
$areaCode = $this->post('areaCode', '86');
|
|
|
$sourceType = $this->post('sourceType');
|
|
|
$nickname = $this->post('nickname');
|
|
|
|
|
|
|
|
|
if (!is_numeric($mobile) || !$openId || !$areaCode || !$sourceType)
|
|
|
if (!is_numeric($phoneNum) || !$openId || !$areaCode || !$sourceType)
|
|
|
{
|
|
|
break;
|
|
|
}
|
|
|
|
|
|
$res = BindData::bindCheck($mobile, $openId, $sourceType);
|
|
|
$res = BindData::bindCheck($phoneNum, $openId, $sourceType);
|
|
|
if (!isset($res['code']))
|
|
|
{
|
|
|
break;
|
|
|
}
|
|
|
if ($res['code'] == 200)
|
|
|
{
|
|
|
$next = Helpers::url('/passport/bind/code', array('isReg' => $res['data']['is_register'], 'openId' => $openId, 'sourceType' => $sourceType, 'nickname' => $nickname, 'areaCode' => $areaCode, 'mobile' => $mobile));
|
|
|
$next = Helpers::url('/passport/bind/code', array('isReg' => $res['data']['is_register'], 'openId' => $openId, 'sourceType' => $sourceType, 'nickname' => $nickname, 'areaCode' => $areaCode, 'phoneNum' => $phoneNum));
|
|
|
$data = array('code' => $res['code'], 'message' => $res['message'], 'data' => array('isReg' => $res['data']['is_register'], 'next' => $next));
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
$data = array('code' => 500, 'message' => $res['message'], 'data' => $res['data']);
|
|
|
$data = array('code' => $res['code'], 'message' => $res['message'], 'data' => $res['data']);
|
|
|
}
|
|
|
}
|
|
|
while (false);
|
...
|
...
|
@@ -159,15 +159,15 @@ class BindController extends AbstractAction |
|
|
break;
|
|
|
}
|
|
|
|
|
|
$mobile = $this->post('mobile');
|
|
|
$phoneNum = $this->post('phoneNum');
|
|
|
$areaCode = $this->post('areaCode');
|
|
|
|
|
|
if (!is_numeric($mobile))
|
|
|
if (!is_numeric($phoneNum))
|
|
|
{
|
|
|
break;
|
|
|
}
|
|
|
|
|
|
$data = BindData::sendBindMsg($areaCode,$mobile);
|
|
|
$data = BindData::sendBindMsg($areaCode,$phoneNum);
|
|
|
if (!isset($data['code']))
|
|
|
{
|
|
|
break;
|
...
|
...
|
@@ -191,16 +191,16 @@ class BindController extends AbstractAction |
|
|
break;
|
|
|
}
|
|
|
|
|
|
$mobile = $this->post('mobile');
|
|
|
$phoneNum = $this->post('phoneNum');
|
|
|
$msgCode = $this->post('msgCode');
|
|
|
$areaCode = $this->post('areaCode');
|
|
|
|
|
|
if (!is_numeric($mobile) || !$msgCode)
|
|
|
if (!is_numeric($phoneNum) || !$msgCode)
|
|
|
{
|
|
|
break;
|
|
|
}
|
|
|
|
|
|
$data = BindData::checkBindCode($areaCode,$mobile, $msgCode);
|
|
|
$data = BindData::checkBindCode($areaCode,$phoneNum, $msgCode);
|
|
|
if (!isset($data['code']))
|
|
|
{
|
|
|
break;
|
...
|
...
|
@@ -224,19 +224,19 @@ class BindController extends AbstractAction |
|
|
break;
|
|
|
}
|
|
|
|
|
|
$mobile = $this->post('mobile');
|
|
|
$phoneNum = $this->post('phoneNum');
|
|
|
$openId = $this->post('openId');
|
|
|
$areaCode = $this->post('areaCode', '86');
|
|
|
$sourceType = $this->post('sourceType');
|
|
|
$nickname = $this->post('nickname');
|
|
|
$password = $this->post('password');
|
|
|
|
|
|
if (!is_numeric($mobile) || !$openId || !$sourceType || !$areaCode)
|
|
|
if (!is_numeric($phoneNum) || !$openId || !$sourceType || !$areaCode)
|
|
|
{
|
|
|
break;
|
|
|
}
|
|
|
|
|
|
$res = BindData::bindMobile($openId, $nickname, $sourceType, $mobile, $areaCode, $password);
|
|
|
$res = BindData::bindMobile($openId, $nickname, $sourceType, $phoneNum, $areaCode, $password);
|
|
|
if (!isset($res['code']))
|
|
|
{
|
|
|
break;
|
...
|
...
|
|