Toggle navigation
Toggle navigation
This project
Loading...
Sign in
fe
/
yohobuy-node
·
Commits
Go to a project
GitLab
Go to group
Project
Activity
Files
Commits
Pipelines
0
Builds
0
Graphs
Milestones
Issues
1
Merge Requests
0
Members
Labels
Wiki
Forks
Network
Create a new issue
Download as
Plain Diff
Browse Files
Authored by
yyq
8 years ago
Commit
ba1d75f35d9e4a97ade47b6b9f71f3dd84b66534
2 parents
a594811c
318766c1
Merge branch 'release/6.1' of git.yoho.cn:fe/yohobuy-node into release/6.1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
2 deletions
apps/home/models/me-gift-service.js
apps/home/models/me-gift-service.js
View file @
ba1d75f
...
...
@@ -103,12 +103,26 @@ module.exports = class extends global.yoho.BaseModel {
}
// 验证手机是否绑定
verifyBinMobile
()
{
verifyBinMobile
(
uid
)
{
let
userInfo
=
{
isBinMobile
:
Number
(
!!
_
.
get
(
this
.
ctx
,
'req.user.mobile'
,
false
))
};
return
Promise
.
resolve
(
userInfo
);
if
(
userInfo
.
isBinMobile
)
{
return
Promise
.
resolve
(
userInfo
);
}
return
this
.
meGiftAPi
.
getProfile
(
uid
).
then
(
d
=>
{
let
mobile
=
_
.
get
(
d
,
'data.verify_mobile'
,
''
);
if
(
mobile
)
{
_
.
set
(
this
.
ctx
,
'req.session.USER_MOBILE'
,
mobile
);
}
Object
.
assign
(
userInfo
,
{
isBinMobile
:
Number
(
!!
mobile
),
email
:
_
.
get
(
d
,
'data.verify_email'
,
''
)});
return
userInfo
;
});
}
// 发送邮箱验证码
...
...
Please
register
or
login
to post a comment