...
|
...
|
@@ -20,7 +20,7 @@ class BackController extends WebAction { |
|
|
'coverImg' => $banner ['img'],
|
|
|
'countryCode' => '86',
|
|
|
'countryName' => '中国',
|
|
|
'captchaUrl' => '/passport/images?t=1449799445',
|
|
|
'captchaUrl' => SITE_MAIN.'/passport/images?t=1449799445',
|
|
|
'countryList' => RegData::getAreasData()
|
|
|
)
|
|
|
);
|
...
|
...
|
@@ -34,7 +34,7 @@ class BackController extends WebAction { |
|
|
{
|
|
|
$phoneNum = $this->post('phoneNum', '');
|
|
|
$area = intval($this->post('area', '86'));
|
|
|
$verifyCode = $this->post('verifyCode', '');
|
|
|
$verifyCode = $this->post('verifyCode', '');//图形验证码
|
|
|
$data = array(
|
|
|
'code' => 200,
|
|
|
'message' => '验证成功'
|
...
|
...
|
@@ -66,7 +66,7 @@ class BackController extends WebAction { |
|
|
public function emailAction() {
|
|
|
$phoneNum = $this->post ('phoneNum', '');
|
|
|
$area = intval ($this->post('area', '86'));
|
|
|
$verifyCode = $this->post('verifyCode', '');
|
|
|
$verifyCode = $this->post('verifyCode', '');//图形验证码
|
|
|
if (Helpers::verifyEmail($phoneNum)) { // 验证邮箱
|
|
|
$email = $phoneNum;
|
|
|
$data = BackData::sendCodeToEmail($email);
|
...
|
...
|
@@ -100,7 +100,7 @@ class BackController extends WebAction { |
|
|
{
|
|
|
$mobile = $this->post ('mobile', '');
|
|
|
$area = intval ($this->post( 'area', '86' ));
|
|
|
$verifyCode = $this->post ('verifyCode', '');
|
|
|
$verifyCode = $this->post ('verifyCode', '');//图形验证码
|
|
|
$data = array('code' => 400, 'message' =>'验证失败');
|
|
|
if(Helpers::verifyMobile($mobile) && PassportModel::verifyCode($verifyCode)) { // 验证手机号
|
|
|
$data = BackData::sendCodeToMobile($mobile, $area);
|
...
|
...
|
@@ -117,12 +117,21 @@ class BackController extends WebAction { |
|
|
$this->redirect ('index');
|
|
|
}
|
|
|
$banner = PassportModel::getLeftBanner(PassportModel::BACK_LFFT_BANNER_CODE);
|
|
|
$emailArr = explode('@', $email);
|
|
|
$emailUrl = '';//邮箱地址
|
|
|
$emailUrls = array('yoho.cn' =>'http://smail.yoho.cn');
|
|
|
if(in_array($emailArr[1], $emailUrls)){
|
|
|
$emailUrl = $emailUrls[$emailArr[1]];//邮箱后缀
|
|
|
} else {
|
|
|
$emailUrl = 'http://mail.'.$emailArr[1];
|
|
|
}
|
|
|
$data = array (
|
|
|
'simpleHeader' => PassportModel::getSimpleHeader(false),
|
|
|
'sendEmail' => array (
|
|
|
'coverHref' => $banner ['url'],
|
|
|
'coverImg' => $banner ['img'],
|
|
|
'countrys' => array ()
|
|
|
'countrys' => array (),
|
|
|
'email' => $emailUrl
|
|
|
)
|
|
|
);
|
|
|
$this->_view->display('send-email', $data);
|
...
|
...
|
@@ -133,7 +142,7 @@ class BackController extends WebAction { |
|
|
*/
|
|
|
public function backcodeAction()
|
|
|
{
|
|
|
$code = $this->get('code');
|
|
|
$code = $this->get('code');//加密code兼容以前参数
|
|
|
$info = $this->checkCode($code);
|
|
|
$verifyState = false;//验证状态
|
|
|
$ret = array();
|
...
|
...
|
@@ -172,7 +181,7 @@ class BackController extends WebAction { |
|
|
*/
|
|
|
public function updateAction()
|
|
|
{
|
|
|
$code = $this->post('code');
|
|
|
$code = $this->post('code');//加密code兼容以前参数
|
|
|
$password = $this->post('pwd');
|
|
|
$info = $this->checkCode($code);
|
|
|
if (Helpers::verifyPassword ($password)) {
|
...
|
...
|
@@ -224,7 +233,7 @@ class BackController extends WebAction { |
|
|
{
|
|
|
$mobile = $this->getSession ('mobile');
|
|
|
$area = $this->getSession ('area');
|
|
|
$verifyCode = $this->getSession ('verifyCode');
|
|
|
$verifyCode = $this->getSession ('verifyCode');//图形验证码
|
|
|
if (empty ($mobile)) {
|
|
|
$this->redirect ('index');
|
|
|
}
|
...
|
...
|
@@ -251,8 +260,8 @@ class BackController extends WebAction { |
|
|
{
|
|
|
$mobile = $this->post ( 'mobile' );
|
|
|
$area = $this->post ( 'area' );
|
|
|
$verifyCode = $this->post ( 'verifyCode' );
|
|
|
$code = $this->post ( 'code' ); // code
|
|
|
$verifyCode = $this->post ( 'verifyCode' );//图形验证码
|
|
|
$code = $this->post ( 'code' ); //手机验证码
|
|
|
$data = array('code'=> 400, 'message' => '验证码错误!','data' => SITE_MAIN.'/passport/back/index');
|
|
|
if ($this->getSession ( 'mobile' ) == $mobile && $this->getSession ( 'area' ) == $area && ! empty($code)) {
|
|
|
$result = BackData::validateMobileCode ( $mobile, $code, $area );
|
...
|
...
|
|