Toggle navigation
Toggle navigation
This project
Loading...
Sign in
fe
/
yohobuywap-node
·
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
Email Patches
Plain Diff
Browse Files
Authored by
zhangxiaoru
8 years ago
Commit
c5322b889a4cc74fc55f010b2d6b7308a31b13f4
1 parent
bfc19246
取session中的信息
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
apps/passport/controllers/bind.js
apps/passport/controllers/bind.js
View file @
c5322b8
...
...
@@ -115,6 +115,9 @@ const bind = {
data
.
data
.
isReg
=
result
.
data
.
is_register
;
data
.
data
.
next
=
nextUrl
;
_
.
set
(
req
.
session
,
'bind.area'
,
areaCode
);
_
.
set
(
req
.
session
,
'bind.phoneNum'
,
phoneNum
);
}
else
{
data
.
data
=
result
.
data
;
}
...
...
@@ -181,8 +184,8 @@ const bind = {
},
sendBindMsg
:
(
req
,
res
,
next
)
=>
{
let
phoneNum
=
req
.
body
.
phoneNum
;
let
areaCode
=
req
.
body
.
areaCode
;
let
phoneNum
=
_
.
get
(
req
.
session
,
'bing.phoneNum'
);
let
areaCode
=
_
.
get
(
req
.
session
,
'bind.area'
);
if
(
req
.
xhr
&&
_
.
isNumber
(
parseInt
(
phoneNum
,
0
))
&&
areaCode
)
{
BindService
.
sendBindMsg
(
areaCode
,
phoneNum
).
then
(
result
=>
{
...
...
@@ -191,7 +194,7 @@ const bind = {
if
(
result
.
code
===
200
)
{
_
.
set
(
req
.
session
,
'bind.area'
,
areaCode
);
_
.
set
(
req
.
session
,
'bind.
mobile
'
,
phoneNum
);
_
.
set
(
req
.
session
,
'bind.
phoneNum
'
,
phoneNum
);
--
req
.
session
.
bind
.
count
;
...
...
@@ -200,9 +203,6 @@ const bind = {
}
else
{
_
.
set
(
req
.
session
,
'bind.interval'
,
Date
.
now
()
+
60
*
1000
);
}
// res.json(result);
// return;
}
res
.
json
(
result
);
...
...
Please
register
or
login
to post a comment