...
|
...
|
@@ -50,7 +50,7 @@ class AutouserinfoController extends AbstractAction |
|
|
'actionUrl' => Helpers::url('/autouserinfo/bind'),
|
|
|
'region' => RegData::getAreasData(),
|
|
|
'location' => '+86',
|
|
|
'captchaUrl' => '/passport/images?t=1449799445',
|
|
|
'captchaUrl' => Helpers::url('/passport/images?t=' . time()),
|
|
|
'itemUrl' => Helpers::url('/help/?category_id=9'),
|
|
|
'referUrl' => $refer,
|
|
|
'skipUrl' => SITE_MAIN,
|
...
|
...
|
@@ -71,7 +71,7 @@ class AutouserinfoController extends AbstractAction |
|
|
public function userInfoAction()
|
|
|
{
|
|
|
//获取用户
|
|
|
$uid = $this->getUid(true);
|
|
|
$uid = $this->getUid(false);
|
|
|
$nickname = $this->get('nickname');
|
|
|
$openId = $this->get('openId');
|
|
|
$sourceType = $this->get('sourceType');
|
...
|
...
|
@@ -113,9 +113,9 @@ class AutouserinfoController extends AbstractAction |
|
|
break;
|
|
|
}
|
|
|
|
|
|
$phoneNum = trim($this->post('phoneNum'));
|
|
|
$phoneNum = trim($this->post('mobile'));
|
|
|
$openId = trim($this->post('openId'));
|
|
|
$areaCode = trim($this->post('areaCode', '86'));
|
|
|
$areaCode = trim($this->post('area', '86'));
|
|
|
$sourceType = trim($this->post('sourceType'));
|
|
|
|
|
|
|
...
|
...
|
@@ -152,20 +152,20 @@ class AutouserinfoController extends AbstractAction |
|
|
break;
|
|
|
}
|
|
|
|
|
|
$phoneNum = trim($this->post('phoneNum'));
|
|
|
$areaCode = trim($this->post('areaCode'));
|
|
|
$phoneNum = trim($this->post('mobile'));
|
|
|
$areaCode = trim($this->post('area'));
|
|
|
$verifyCode = trim($this->post('verifyCode'));
|
|
|
|
|
|
//校验手机号格式
|
|
|
if (!is_numeric($phoneNum) || !is_numeric($areaCode)) {
|
|
|
$data['code'] = 401;
|
|
|
$data['code'] = 400;
|
|
|
$data['message'] = '手机号码格式不正确';
|
|
|
break;
|
|
|
}
|
|
|
|
|
|
//检测验证码不正确
|
|
|
if (!PassportModel::verifyCode($verifyCode)) {
|
|
|
$data['code'] = 402;
|
|
|
$data['code'] = 400;
|
|
|
$data['message'] = '图形验证码不正确';
|
|
|
break;
|
|
|
}
|
...
|
...
|
@@ -183,7 +183,6 @@ class AutouserinfoController extends AbstractAction |
|
|
/*
|
|
|
* 校验图形验证码
|
|
|
*/
|
|
|
|
|
|
public function checkPicCodeAction()
|
|
|
{
|
|
|
$data = array('code' => 400, 'message' => '', 'data' => '');
|
...
|
...
|
@@ -193,7 +192,7 @@ class AutouserinfoController extends AbstractAction |
|
|
if (!$this->isAjax()) {
|
|
|
break;
|
|
|
}
|
|
|
$verifyCode = $phoneNum = trim($this->post('verifyCode'));
|
|
|
$verifyCode = trim($this->post('verifyCode'));
|
|
|
$picFlag = PassportModel::verifyCode($verifyCode);
|
|
|
if ($picFlag) {
|
|
|
$data = array('code' => 200, 'message' => '验证码正确', 'data' => '');
|
...
|
...
|
@@ -220,8 +219,8 @@ class AutouserinfoController extends AbstractAction |
|
|
break;
|
|
|
}
|
|
|
|
|
|
$phoneNum = trim($this->post('phoneNum'));
|
|
|
$areaCode = trim($this->post('areaCode'));
|
|
|
$phoneNum = trim($this->post('mobile'));
|
|
|
$areaCode = trim($this->post('area'));
|
|
|
$code = trim($this->post('code')); //短信验证码
|
|
|
//校验手机号格式
|
|
|
if (!is_numeric($phoneNum) || !is_numeric($areaCode)) {
|
...
|
...
|
@@ -253,8 +252,8 @@ class AutouserinfoController extends AbstractAction |
|
|
break;
|
|
|
}
|
|
|
|
|
|
$phoneNum = trim($this->post('phoneNum'));
|
|
|
$areaCode = trim($this->post('areaCode', '86'));
|
|
|
$phoneNum = trim($this->post('mobile'));
|
|
|
$areaCode = trim($this->post('area', '86'));
|
|
|
$openId = trim($this->post('openId'));
|
|
|
$sourceType = trim($this->post('sourceType'));
|
|
|
$code = trim($this->post('code')); //短信验证码
|
...
|
...
|
|