|
@@ -45,7 +45,7 @@ class BackController extends WebAction |
|
@@ -45,7 +45,7 @@ class BackController extends WebAction |
45
|
if(Helpers::verifyEmail($phoneNum)){ //验证邮箱
|
45
|
if(Helpers::verifyEmail($phoneNum)){ //验证邮箱
|
46
|
$email = $phoneNum;
|
46
|
$email = $phoneNum;
|
47
|
$data = BackData::sendCodeToEmail($email);
|
47
|
$data = BackData::sendCodeToEmail($email);
|
48
|
- $this->setSession('phoneNum', $phoneNum);
|
48
|
+ $this->setSession('email', $email);
|
49
|
if($data['code'] == 200) {
|
49
|
if($data['code'] == 200) {
|
50
|
$this->redirect('sendemail');
|
50
|
$this->redirect('sendemail');
|
51
|
}
|
51
|
}
|
|
@@ -55,7 +55,7 @@ class BackController extends WebAction |
|
@@ -55,7 +55,7 @@ class BackController extends WebAction |
55
|
} else if(Helpers::verifyMobile($phoneNum)) {//验证手机号
|
55
|
} else if(Helpers::verifyMobile($phoneNum)) {//验证手机号
|
56
|
$mobile = $phoneNum;
|
56
|
$mobile = $phoneNum;
|
57
|
$data = BackData::sendCodeToMobile($mobile);
|
57
|
$data = BackData::sendCodeToMobile($mobile);
|
58
|
- $this->setSession('phoneNum', $phoneNum);
|
58
|
+ $this->setSession('mobile', $mobile);
|
59
|
$this->setSession('area', $area);
|
59
|
$this->setSession('area', $area);
|
60
|
$this->setSession('verifyCode', $verifyCode);
|
60
|
$this->setSession('verifyCode', $verifyCode);
|
61
|
if($data['code'] == 200) {
|
61
|
if($data['code'] == 200) {
|
|
@@ -71,8 +71,8 @@ class BackController extends WebAction |
|
@@ -71,8 +71,8 @@ class BackController extends WebAction |
71
|
* 发送邮件页面
|
71
|
* 发送邮件页面
|
72
|
*/
|
72
|
*/
|
73
|
public function sendemailAction() {
|
73
|
public function sendemailAction() {
|
74
|
- $phoneNum = $this->getSession('phoneNum');
|
|
|
75
|
- if(empty($phoneNum)) {
|
74
|
+ $email = $this->getSession('email');
|
|
|
75
|
+ if(empty($email)) {
|
76
|
$this->redirect('index');
|
76
|
$this->redirect('index');
|
77
|
}
|
77
|
}
|
78
|
$banner = PassportModel::getLeftBanner(PassportModel::BACK_LFFT_BANNER_CODE);
|
78
|
$banner = PassportModel::getLeftBanner(PassportModel::BACK_LFFT_BANNER_CODE);
|
|
@@ -158,10 +158,10 @@ class BackController extends WebAction |
|
@@ -158,10 +158,10 @@ class BackController extends WebAction |
158
|
* 手机验证页面
|
158
|
* 手机验证页面
|
159
|
*/
|
159
|
*/
|
160
|
public function verificationAction() {
|
160
|
public function verificationAction() {
|
161
|
- $phoneNum = $this->getSession('phoneNum');
|
161
|
+ $mobile = $this->getSession('mobile');
|
162
|
$area = $this->getSession('area');
|
162
|
$area = $this->getSession('area');
|
163
|
$verifyCode = $this->getSession('verifyCode');
|
163
|
$verifyCode = $this->getSession('verifyCode');
|
164
|
- if(empty($phoneNum)) {
|
164
|
+ if(empty($mobile)) {
|
165
|
$this->redirect('index');
|
165
|
$this->redirect('index');
|
166
|
}
|
166
|
}
|
167
|
$banner = PassportModel::getLeftBanner(PassportModel::BACK_LFFT_BANNER_CODE);
|
167
|
$banner = PassportModel::getLeftBanner(PassportModel::BACK_LFFT_BANNER_CODE);
|
|
@@ -171,9 +171,9 @@ class BackController extends WebAction |
|
@@ -171,9 +171,9 @@ class BackController extends WebAction |
171
|
'verification' => array(
|
171
|
'verification' => array(
|
172
|
'coverHref' => $banner['url'],
|
172
|
'coverHref' => $banner['url'],
|
173
|
'coverImg' => $banner['img'],
|
173
|
'coverImg' => $banner['img'],
|
174
|
- 'phoneNum' => $phoneNum,
|
174
|
+ 'mobile' => $mobile,
|
175
|
'area' => $area,
|
175
|
'area' => $area,
|
176
|
- 'captcha'=> $captcha,
|
176
|
+ 'verifyCode'=> $verifyCode,
|
177
|
'countrys' => array()
|
177
|
'countrys' => array()
|
178
|
)
|
178
|
)
|
179
|
);
|
179
|
);
|
|
@@ -185,11 +185,11 @@ class BackController extends WebAction |
|
@@ -185,11 +185,11 @@ class BackController extends WebAction |
185
|
*/
|
185
|
*/
|
186
|
public function backmobileAction()
|
186
|
public function backmobileAction()
|
187
|
{
|
187
|
{
|
188
|
- $mobile = $this->post('mobile');//phoneNum
|
188
|
+ $mobile = $this->post('mobile');
|
189
|
$area = $this->post('area');
|
189
|
$area = $this->post('area');
|
190
|
- //$captcha = $this->post('captcha');
|
|
|
191
|
- $code = $this->post('captcha');//code
|
|
|
192
|
- if($this->getSession('phoneNum') == $mobile && $this->getSession('area') == $area)
|
190
|
+ $verifyCode = $this->post('verifyCode');
|
|
|
191
|
+ $code = $this->post('code');//code
|
|
|
192
|
+ if($this->getSession('mobile') == $mobile && $this->getSession('area') == $area)
|
193
|
{
|
193
|
{
|
194
|
$result = BackData::validateMobileCode($mobile, $code, $area);
|
194
|
$result = BackData::validateMobileCode($mobile, $code, $area);
|
195
|
if($result['code'] == 200) {
|
195
|
if($result['code'] == 200) {
|