Toggle navigation
Toggle navigation
This project
Loading...
Sign in
fe
/
YOHOBUYWAP
·
Commits
Go to a project
GitLab
Go to group
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
Plain Diff
Browse Files
Authored by
周少峰
9 years ago
Commit
5f76db06a8233fef80bac1c84fa6cc329f9c2900
2 parents
74ba6221
212623b5
Merge branch 'develop' of git.dev.yoho.cn:web/yohobuy into develop
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
17 deletions
yohobuy/m.yohobuy.com/application/modules/Passport/controllers/Bind.php
yohobuy/m.yohobuy.com/application/modules/Passport/controllers/Bind.php
View file @
5f76db0
...
...
@@ -56,8 +56,8 @@ class BindController extends AbstractAction
$nickname
=
$this
->
get
(
'nickname'
);
$areaCode
=
$this
->
get
(
'areaCode'
,
'86'
);
$isReg
=
$this
->
get
(
'isReg'
);
$mobile
=
$this
->
get
(
'mobile'
);
$phoneNum
=
$this
->
get
(
'phoneNum'
);
$data
=
array
(
'bindIndex'
=>
true
,
//js标识
'backUrl'
=>
'/'
,
// 返回的URL链接
...
...
@@ -68,7 +68,7 @@ class BindController extends AbstractAction
'nickname'
=>
$nickname
,
//昵称
'isReg'
=>
$isReg
,
//是否是已注册过的手机号
'areaCode'
=>
$areaCode
,
//国别码
'phoneNum'
=>
$
mobile
,
//手机号码
'phoneNum'
=>
$
phoneNum
,
//手机号码
);
// 渲染模板
...
...
@@ -114,31 +114,31 @@ class BindController extends AbstractAction
break
;
}
$
mobile
=
$this
->
post
(
'mobile
'
);
$
phoneNum
=
$this
->
post
(
'phoneNum
'
);
$openId
=
$this
->
post
(
'openId'
);
$areaCode
=
$this
->
post
(
'areaCode'
,
'86'
);
$sourceType
=
$this
->
post
(
'sourceType'
);
$nickname
=
$this
->
post
(
'nickname'
);
if
(
!
is_numeric
(
$
mobile
)
||
!
$openId
||
!
$areaCode
||
!
$sourceType
)
if
(
!
is_numeric
(
$
phoneNum
)
||
!
$openId
||
!
$areaCode
||
!
$sourceType
)
{
break
;
}
$res
=
BindData
::
bindCheck
(
$
mobile
,
$openId
,
$sourceType
);
$res
=
BindData
::
bindCheck
(
$
phoneNum
,
$openId
,
$sourceType
);
if
(
!
isset
(
$res
[
'code'
]))
{
break
;
}
if
(
$res
[
'code'
]
==
200
)
{
$next
=
Helpers
::
url
(
'/passport/bind/code'
,
array
(
'isReg'
=>
$res
[
'data'
][
'is_register'
],
'openId'
=>
$openId
,
'sourceType'
=>
$sourceType
,
'nickname'
=>
$nickname
,
'areaCode'
=>
$areaCode
,
'
mobile'
=>
$mobile
));
$next
=
Helpers
::
url
(
'/passport/bind/code'
,
array
(
'isReg'
=>
$res
[
'data'
][
'is_register'
],
'openId'
=>
$openId
,
'sourceType'
=>
$sourceType
,
'nickname'
=>
$nickname
,
'areaCode'
=>
$areaCode
,
'
phoneNum'
=>
$phoneNum
));
$data
=
array
(
'code'
=>
$res
[
'code'
],
'message'
=>
$res
[
'message'
],
'data'
=>
array
(
'isReg'
=>
$res
[
'data'
][
'is_register'
],
'next'
=>
$next
));
}
else
{
$data
=
array
(
'code'
=>
500
,
'message'
=>
$res
[
'message'
],
'data'
=>
$res
[
'data'
]);
$data
=
array
(
'code'
=>
$res
[
'code'
]
,
'message'
=>
$res
[
'message'
],
'data'
=>
$res
[
'data'
]);
}
}
while
(
false
);
...
...
@@ -159,15 +159,15 @@ class BindController extends AbstractAction
break
;
}
$
mobile
=
$this
->
post
(
'mobile
'
);
$
phoneNum
=
$this
->
post
(
'phoneNum
'
);
$areaCode
=
$this
->
post
(
'areaCode'
);
if
(
!
is_numeric
(
$
mobile
))
if
(
!
is_numeric
(
$
phoneNum
))
{
break
;
}
$data
=
BindData
::
sendBindMsg
(
$areaCode
,
$
mobile
);
$data
=
BindData
::
sendBindMsg
(
$areaCode
,
$
phoneNum
);
if
(
!
isset
(
$data
[
'code'
]))
{
break
;
...
...
@@ -191,16 +191,16 @@ class BindController extends AbstractAction
break
;
}
$
mobile
=
$this
->
post
(
'mobile
'
);
$
phoneNum
=
$this
->
post
(
'phoneNum
'
);
$msgCode
=
$this
->
post
(
'msgCode'
);
$areaCode
=
$this
->
post
(
'areaCode'
);
if
(
!
is_numeric
(
$
mobile
)
||
!
$msgCode
)
if
(
!
is_numeric
(
$
phoneNum
)
||
!
$msgCode
)
{
break
;
}
$data
=
BindData
::
checkBindCode
(
$areaCode
,
$
mobile
,
$msgCode
);
$data
=
BindData
::
checkBindCode
(
$areaCode
,
$
phoneNum
,
$msgCode
);
if
(
!
isset
(
$data
[
'code'
]))
{
break
;
...
...
@@ -224,19 +224,19 @@ class BindController extends AbstractAction
break
;
}
$
mobile
=
$this
->
post
(
'mobile
'
);
$
phoneNum
=
$this
->
post
(
'phoneNum
'
);
$openId
=
$this
->
post
(
'openId'
);
$areaCode
=
$this
->
post
(
'areaCode'
,
'86'
);
$sourceType
=
$this
->
post
(
'sourceType'
);
$nickname
=
$this
->
post
(
'nickname'
);
$password
=
$this
->
post
(
'password'
);
if
(
!
is_numeric
(
$
mobile
)
||
!
$openId
||
!
$sourceType
||
!
$areaCode
)
if
(
!
is_numeric
(
$
phoneNum
)
||
!
$openId
||
!
$sourceType
||
!
$areaCode
)
{
break
;
}
$res
=
BindData
::
bindMobile
(
$openId
,
$nickname
,
$sourceType
,
$
mobile
,
$areaCode
,
$password
);
$res
=
BindData
::
bindMobile
(
$openId
,
$nickname
,
$sourceType
,
$
phoneNum
,
$areaCode
,
$password
);
if
(
!
isset
(
$res
[
'code'
]))
{
break
;
...
...
Please
register
or
login
to post a comment