|
@@ -20,7 +20,7 @@ class BackController extends WebAction { |
|
@@ -20,7 +20,7 @@ class BackController extends WebAction { |
20
|
'coverImg' => $banner ['img'],
|
20
|
'coverImg' => $banner ['img'],
|
21
|
'countryCode' => '86',
|
21
|
'countryCode' => '86',
|
22
|
'countryName' => '中国',
|
22
|
'countryName' => '中国',
|
23
|
- 'captchaUrl' => '/passport/images?t=1449799445',
|
23
|
+ 'captchaUrl' => SITE_MAIN.'/passport/images?t=1449799445',
|
24
|
'countryList' => RegData::getAreasData()
|
24
|
'countryList' => RegData::getAreasData()
|
25
|
)
|
25
|
)
|
26
|
);
|
26
|
);
|
|
@@ -34,7 +34,7 @@ class BackController extends WebAction { |
|
@@ -34,7 +34,7 @@ class BackController extends WebAction { |
34
|
{
|
34
|
{
|
35
|
$phoneNum = $this->post('phoneNum', '');
|
35
|
$phoneNum = $this->post('phoneNum', '');
|
36
|
$area = intval($this->post('area', '86'));
|
36
|
$area = intval($this->post('area', '86'));
|
37
|
- $verifyCode = $this->post('verifyCode', '');
|
37
|
+ $verifyCode = $this->post('verifyCode', '');//图形验证码
|
38
|
$data = array(
|
38
|
$data = array(
|
39
|
'code' => 200,
|
39
|
'code' => 200,
|
40
|
'message' => '验证成功'
|
40
|
'message' => '验证成功'
|
|
@@ -66,7 +66,7 @@ class BackController extends WebAction { |
|
@@ -66,7 +66,7 @@ class BackController extends WebAction { |
66
|
public function emailAction() {
|
66
|
public function emailAction() {
|
67
|
$phoneNum = $this->post ('phoneNum', '');
|
67
|
$phoneNum = $this->post ('phoneNum', '');
|
68
|
$area = intval ($this->post('area', '86'));
|
68
|
$area = intval ($this->post('area', '86'));
|
69
|
- $verifyCode = $this->post('verifyCode', '');
|
69
|
+ $verifyCode = $this->post('verifyCode', '');//图形验证码
|
70
|
if (Helpers::verifyEmail($phoneNum)) { // 验证邮箱
|
70
|
if (Helpers::verifyEmail($phoneNum)) { // 验证邮箱
|
71
|
$email = $phoneNum;
|
71
|
$email = $phoneNum;
|
72
|
$data = BackData::sendCodeToEmail($email);
|
72
|
$data = BackData::sendCodeToEmail($email);
|
|
@@ -100,7 +100,7 @@ class BackController extends WebAction { |
|
@@ -100,7 +100,7 @@ class BackController extends WebAction { |
100
|
{
|
100
|
{
|
101
|
$mobile = $this->post ('mobile', '');
|
101
|
$mobile = $this->post ('mobile', '');
|
102
|
$area = intval ($this->post( 'area', '86' ));
|
102
|
$area = intval ($this->post( 'area', '86' ));
|
103
|
- $verifyCode = $this->post ('verifyCode', '');
|
103
|
+ $verifyCode = $this->post ('verifyCode', '');//图形验证码
|
104
|
$data = array('code' => 400, 'message' =>'验证失败');
|
104
|
$data = array('code' => 400, 'message' =>'验证失败');
|
105
|
if(Helpers::verifyMobile($mobile) && PassportModel::verifyCode($verifyCode)) { // 验证手机号
|
105
|
if(Helpers::verifyMobile($mobile) && PassportModel::verifyCode($verifyCode)) { // 验证手机号
|
106
|
$data = BackData::sendCodeToMobile($mobile, $area);
|
106
|
$data = BackData::sendCodeToMobile($mobile, $area);
|
|
@@ -117,12 +117,21 @@ class BackController extends WebAction { |
|
@@ -117,12 +117,21 @@ class BackController extends WebAction { |
117
|
$this->redirect ('index');
|
117
|
$this->redirect ('index');
|
118
|
}
|
118
|
}
|
119
|
$banner = PassportModel::getLeftBanner(PassportModel::BACK_LFFT_BANNER_CODE);
|
119
|
$banner = PassportModel::getLeftBanner(PassportModel::BACK_LFFT_BANNER_CODE);
|
|
|
120
|
+ $emailArr = explode('@', $email);
|
|
|
121
|
+ $emailUrl = '';//邮箱地址
|
|
|
122
|
+ $emailUrls = array('yoho.cn' =>'http://smail.yoho.cn');
|
|
|
123
|
+ if(in_array($emailArr[1], $emailUrls)){
|
|
|
124
|
+ $emailUrl = $emailUrls[$emailArr[1]];//邮箱后缀
|
|
|
125
|
+ } else {
|
|
|
126
|
+ $emailUrl = 'http://mail.'.$emailArr[1];
|
|
|
127
|
+ }
|
120
|
$data = array (
|
128
|
$data = array (
|
121
|
'simpleHeader' => PassportModel::getSimpleHeader(false),
|
129
|
'simpleHeader' => PassportModel::getSimpleHeader(false),
|
122
|
'sendEmail' => array (
|
130
|
'sendEmail' => array (
|
123
|
'coverHref' => $banner ['url'],
|
131
|
'coverHref' => $banner ['url'],
|
124
|
'coverImg' => $banner ['img'],
|
132
|
'coverImg' => $banner ['img'],
|
125
|
- 'countrys' => array ()
|
133
|
+ 'countrys' => array (),
|
|
|
134
|
+ 'email' => $emailUrl
|
126
|
)
|
135
|
)
|
127
|
);
|
136
|
);
|
128
|
$this->_view->display('send-email', $data);
|
137
|
$this->_view->display('send-email', $data);
|
|
@@ -133,7 +142,7 @@ class BackController extends WebAction { |
|
@@ -133,7 +142,7 @@ class BackController extends WebAction { |
133
|
*/
|
142
|
*/
|
134
|
public function backcodeAction()
|
143
|
public function backcodeAction()
|
135
|
{
|
144
|
{
|
136
|
- $code = $this->get('code');
|
145
|
+ $code = $this->get('code');//加密code兼容以前参数
|
137
|
$info = $this->checkCode($code);
|
146
|
$info = $this->checkCode($code);
|
138
|
$verifyState = false;//验证状态
|
147
|
$verifyState = false;//验证状态
|
139
|
$ret = array();
|
148
|
$ret = array();
|
|
@@ -172,7 +181,7 @@ class BackController extends WebAction { |
|
@@ -172,7 +181,7 @@ class BackController extends WebAction { |
172
|
*/
|
181
|
*/
|
173
|
public function updateAction()
|
182
|
public function updateAction()
|
174
|
{
|
183
|
{
|
175
|
- $code = $this->post('code');
|
184
|
+ $code = $this->post('code');//加密code兼容以前参数
|
176
|
$password = $this->post('pwd');
|
185
|
$password = $this->post('pwd');
|
177
|
$info = $this->checkCode($code);
|
186
|
$info = $this->checkCode($code);
|
178
|
if (Helpers::verifyPassword ($password)) {
|
187
|
if (Helpers::verifyPassword ($password)) {
|
|
@@ -224,7 +233,7 @@ class BackController extends WebAction { |
|
@@ -224,7 +233,7 @@ class BackController extends WebAction { |
224
|
{
|
233
|
{
|
225
|
$mobile = $this->getSession ('mobile');
|
234
|
$mobile = $this->getSession ('mobile');
|
226
|
$area = $this->getSession ('area');
|
235
|
$area = $this->getSession ('area');
|
227
|
- $verifyCode = $this->getSession ('verifyCode');
|
236
|
+ $verifyCode = $this->getSession ('verifyCode');//图形验证码
|
228
|
if (empty ($mobile)) {
|
237
|
if (empty ($mobile)) {
|
229
|
$this->redirect ('index');
|
238
|
$this->redirect ('index');
|
230
|
}
|
239
|
}
|
|
@@ -251,8 +260,8 @@ class BackController extends WebAction { |
|
@@ -251,8 +260,8 @@ class BackController extends WebAction { |
251
|
{
|
260
|
{
|
252
|
$mobile = $this->post ( 'mobile' );
|
261
|
$mobile = $this->post ( 'mobile' );
|
253
|
$area = $this->post ( 'area' );
|
262
|
$area = $this->post ( 'area' );
|
254
|
- $verifyCode = $this->post ( 'verifyCode' );
|
|
|
255
|
- $code = $this->post ( 'code' ); // code
|
263
|
+ $verifyCode = $this->post ( 'verifyCode' );//图形验证码
|
|
|
264
|
+ $code = $this->post ( 'code' ); //手机验证码
|
256
|
$data = array('code'=> 400, 'message' => '验证码错误!','data' => SITE_MAIN.'/passport/back/index');
|
265
|
$data = array('code'=> 400, 'message' => '验证码错误!','data' => SITE_MAIN.'/passport/back/index');
|
257
|
if ($this->getSession ( 'mobile' ) == $mobile && $this->getSession ( 'area' ) == $area && ! empty($code)) {
|
266
|
if ($this->getSession ( 'mobile' ) == $mobile && $this->getSession ( 'area' ) == $area && ! empty($code)) {
|
258
|
$result = BackData::validateMobileCode ( $mobile, $code, $area );
|
267
|
$result = BackData::validateMobileCode ( $mobile, $code, $area );
|