Toggle navigation
Toggle navigation
This project
Loading...
Sign in
chenchao
/
YOHOBUYPC
·
Commits
Go to a project
GitLab
Go to dashboard
Project
Activity
Files
Commits
Pipelines
0
Builds
0
Graphs
Milestones
Issues
0
Merge Requests
0
Members
Labels
Wiki
Forks
Network
Create a new issue
Download as
Email Patches
Plain Diff
Browse Files
Authored by
Rock Zhang
9 years ago
Commit
76a60f99560f2ff0a1d90558ed650eb9c9de2387
1 parent
57a15979
修改代码的一些字段名称
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
35 additions
and
19 deletions
yohobuy/m.yohobuy.com/application/modules/Passport/controllers/Back.php
yohobuy/m.yohobuy.com/application/modules/Passport/controllers/Back.php
View file @
76a60f9
...
...
@@ -108,7 +108,7 @@ class BackController extends AbstractAction
}
// 处理地区信息
foreach
(
$areas
as
&
$val
)
{
$val
[
'areaCode'
]
=
$val
[
'area'
];
$val
[
'areaCode'
]
=
'+'
.
$val
[
'area'
];
if
(
$val
[
'area'
]
===
'86'
)
{
$val
[
'selected'
]
=
true
;
...
...
@@ -145,28 +145,36 @@ class BackController extends AbstractAction
{
if
(
$this
->
isAjax
())
{
$mobile
=
$this
->
post
(
'mobile'
,
''
);
$area
=
$this
->
post
(
'area'
,
86
);
$phoneNum
=
$this
->
post
(
'phoneNum'
,
''
);
$areaCode
=
$this
->
post
(
'areaCode'
,
86
);
// 发送手机验证码
$result
=
BackData
::
sendCodeToMobile
(
$mobile
,
$area
);
$result
=
BackData
::
sendCodeToMobile
(
$phoneNum
,
$areaCode
);
if
(
$result
[
'code'
]
===
200
)
{
$result
[
'data'
]
=
'/passport/back/mobilecode?phoneNum='
.
$phoneNum
.
'&areaCode='
.
$areaCode
;
}
$this
->
echoJson
(
$result
);
}
}
/**
* 校验验证码页面
*/
public
function
mobilecodeAction
()
{
$mobile
=
$this
->
get
(
'mobile'
,
''
);
$area
=
$this
->
get
(
'area'
,
86
);
$areacode
=
'+'
.
$area
;
$phoneNum
=
$this
->
get
(
'phoneNum'
,
''
);
$areaCode
=
$this
->
get
(
'areaCode'
,
86
);
$areaCode
=
'+'
.
$areaCode
;
$data
=
array
(
'backUrl'
=>
'/passport/back/mobile'
,
'headerText'
=>
'找回密码'
,
'isPassportPage'
=>
true
,
'areaCode'
=>
$areacode
,
'phoneNum'
=>
$mobile
'backCode'
=>
true
,
'areaCode'
=>
$areaCode
,
'phoneNum'
=>
$phoneNum
);
$this
->
_view
->
assign
(
'title'
,
'YOHO!有货'
);
...
...
@@ -182,12 +190,16 @@ class BackController extends AbstractAction
{
if
(
$this
->
isAjax
())
{
$
mobile
=
$this
->
post
(
'mobile
'
,
''
);
$
phoneNum
=
$this
->
post
(
'phoneNum
'
,
''
);
$code
=
$this
->
post
(
'code'
,
''
);
$area
=
$this
->
post
(
'area
'
,
86
);
$area
Code
=
$this
->
post
(
'areaCode
'
,
86
);
// 校验手机验证码
$result
=
BackData
::
validateMobileCode
(
$mobile
,
$code
,
$area
);
$result
=
BackData
::
validateMobileCode
(
$phoneNum
,
$code
,
$areaCode
);
if
(
$result
[
'code'
]
===
200
)
{
$result
[
'data'
]
=
'/passport/back/password?phoneNum='
.
$phoneNum
.
'&token='
.
$result
[
'token'
]
.
'&areaCode='
.
$areaCode
;
}
$this
->
echoJson
(
$result
);
}
...
...
@@ -195,10 +207,10 @@ class BackController extends AbstractAction
public
function
passwordAction
()
{
$
mobile
=
$this
->
get
(
'mobile
'
,
''
);
$
phoneNum
=
$this
->
get
(
'phoneNum
'
,
''
);
// 手机验证令牌
$token
=
$this
->
get
(
'token'
,
''
);
$area
=
$this
->
get
(
'area
'
,
86
);
$area
Code
=
$this
->
get
(
'areaCode
'
,
86
);
// 邮箱验证码
$code
=
$this
->
get
(
'code'
,
''
);
...
...
@@ -208,9 +220,9 @@ class BackController extends AbstractAction
'headerText'
=>
'找回密码'
,
'isPassportPage'
=>
true
,
'backNewPwd'
=>
true
,
'
mobile'
=>
$mobile
,
'
phoneNum'
=>
$phoneNum
,
'token'
=>
$token
,
'areaCode'
=>
$area
,
'areaCode'
=>
$area
Code
,
'code'
=>
$code
);
...
...
@@ -227,13 +239,17 @@ class BackController extends AbstractAction
{
if
(
$this
->
isAjax
())
{
$
mobile
=
$this
->
post
(
'mobile
'
,
''
);
$
phoneNum
=
$this
->
post
(
'phoneNum
'
,
''
);
$token
=
$this
->
post
(
'token'
,
''
);
$newpwd
=
$this
->
post
(
'password'
,
''
);
$area
=
$this
->
post
(
'area
'
,
86
);
$area
Code
=
$this
->
post
(
'areaCode
'
,
86
);
// 根据手机验证码修改密码
$result
=
BackData
::
modifyPasswordByMobile
(
$mobile
,
$token
,
$newpwd
,
$area
);
$result
=
BackData
::
modifyPasswordByMobile
(
$phoneNum
,
$token
,
$newpwd
,
$areaCode
);
if
(
$result
[
'code'
]
===
200
)
{
$result
[
'data'
]
=
'/'
;
}
$this
->
echoJson
(
$result
);
}
...
...
Please
register
or
login
to post a comment