Authored by Rock Zhang

修复找回密码中的一些bug

@@ -92,9 +92,12 @@ class BackController extends AbstractAction @@ -92,9 +92,12 @@ class BackController extends AbstractAction
92 92
93 public function successAction() 93 public function successAction()
94 { 94 {
95 - $this->setTitle('找回密码-通过邮箱');  
96 -  
97 $email = $this->get('email', ''); 95 $email = $this->get('email', '');
  96 + // 判断是否允许访问, 不允许则跳转到错误页面
  97 + if (!Helpers::verifyEmail($email)) {
  98 + $this->error();
  99 + }
  100 +
98 // 获取到邮箱域名 101 // 获取到邮箱域名
99 list($name, $domain) = explode('@', $email); 102 list($name, $domain) = explode('@', $email);
100 $domain_name = 'http://' . (($domain == 'gmail.com') ? 'mail.google.com' : 'mail.' . $domain); 103 $domain_name = 'http://' . (($domain == 'gmail.com') ? 'mail.google.com' : 'mail.' . $domain);
@@ -108,6 +111,7 @@ class BackController extends AbstractAction @@ -108,6 +111,7 @@ class BackController extends AbstractAction
108 'resendUrl' => '/passport/back/resendemail?email='.$email 111 'resendUrl' => '/passport/back/resendemail?email='.$email
109 ); 112 );
110 113
  114 + $this->setTitle('找回密码-通过邮箱');
111 $this->_view->display('email-success', $data); 115 $this->_view->display('email-success', $data);
112 } 116 }
113 117
@@ -147,11 +151,11 @@ class BackController extends AbstractAction @@ -147,11 +151,11 @@ class BackController extends AbstractAction
147 'isPassportPage' => true, 151 'isPassportPage' => true,
148 'backMobile' => true, 152 'backMobile' => true,
149 'countrys' => RegData::getAreasData(), 153 'countrys' => RegData::getAreasData(),
150 - 'countryCode' => '+86' 154 + 'areaCode' => '+86'
151 ); 155 );
152 156
153 // 生成HTML (phoneback.html) 157 // 生成HTML (phoneback.html)
154 - $this->_view->html('phoneback'); 158 + // $this->_view->html('phoneback');
155 159
156 $this->_view->display('mobile', $data); 160 $this->_view->display('mobile', $data);
157 } 161 }
@@ -178,10 +182,14 @@ class BackController extends AbstractAction @@ -178,10 +182,14 @@ class BackController extends AbstractAction
178 } 182 }
179 183
180 // 发送手机验证码 184 // 发送手机验证码
181 - $return = BackData::sendCodeToMobile($phoneNum, $areaCode);  
182 - if($return && $return['code'] === 200) 185 + $result = BackData::sendCodeToMobile($phoneNum, $areaCode);
  186 + if(empty($result))
  187 + {
  188 + break;
  189 + }
  190 +
  191 + if($result['code'] === 200)
183 { 192 {
184 - $result = $return;  
185 $result['data'] = '/passport/back/mobilecode?phoneNum='.$phoneNum.'&areaCode='.$areaCode; 193 $result['data'] = '/passport/back/mobilecode?phoneNum='.$phoneNum.'&areaCode='.$areaCode;
186 } 194 }
187 195
@@ -201,7 +209,7 @@ class BackController extends AbstractAction @@ -201,7 +209,7 @@ class BackController extends AbstractAction
201 $areaCode = '+'.$areaCode; 209 $areaCode = '+'.$areaCode;
202 210
203 $data = array( 211 $data = array(
204 - 'backUrl' => '/mobileback.html', 212 + 'backUrl' => '/phoneback.html',
205 'headerText' => '找回密码', 213 'headerText' => '找回密码',
206 'isPassportPage' => true, 214 'isPassportPage' => true,
207 'backCode' => true, 215 'backCode' => true,