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
Email Patches
Plain Diff
Browse Files
Authored by
yyq
7 years ago
Commit
934f100cded0f9d64a8a92f550712d8a553d8a09
1 parent
13b2a325
change udid
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
12 additions
and
11 deletions
apps/passport/controllers/login.js
apps/passport/controllers/reg.js
apps/passport/models/reg-api.js
apps/product/models/list.js
apps/product/models/search.js
apps/passport/controllers/login.js
View file @
934f100
...
...
@@ -218,11 +218,7 @@ const local = {
})(
req
,
res
,
next
);
},
logout
:
(
req
,
res
)
=>
{
if
(
req
.
session
)
{
_
.
unset
(
req
.
session
,
'TOKEN_'
);
_
.
unset
(
req
.
session
,
'LOGIN_UID_'
);
_
.
unset
(
req
.
session
,
'USER_MOBILE'
);
}
req
.
session
.
reset
();
res
.
clearCookie
(
'_UID'
,
{
domain
:
config
.
cookieDomain
...
...
apps/passport/controllers/reg.js
View file @
934f100
...
...
@@ -275,7 +275,8 @@ let mobileRegister = (req, res, next) => {
/* 手机注册: 调用注册接口*/
let
regResult
=
yield
req
.
ctx
(
RegService
).
regMobileAes
(
area
,
mobile
,
password
,
code
,
cookie
.
getShoppingKey
(
req
),
inviteCode
,
clientIp
area
,
mobile
,
password
,
code
,
cookie
.
getShoppingKey
(
req
),
inviteCode
,
clientIp
,
{
udid
:
req
.
yoho
.
udid
}
);
if
(
!
regResult
.
code
||
regResult
.
code
!==
200
)
{
...
...
apps/passport/models/reg-api.js
View file @
934f100
...
...
@@ -35,13 +35,13 @@ module.exports = class extends global.yoho.BaseModel {
return
this
.
post
({
data
:
params
});
}
regMobileAes
(
area
,
mobile
,
password
,
code
,
shoppingKey
,
inviteCode
)
{
regMobileAes
(
area
,
mobile
,
password
,
code
,
shoppingKey
,
inviteCode
,
other
=
{}
)
{
let
params
=
{
method
:
'app.passport.registerAES'
,
area
:
area
,
profile
:
mobile
,
password
:
aes
.
aesPwd
(
password
),
verifyCode
:
code
verifyCode
:
code
,
};
if
(
shoppingKey
)
{
...
...
@@ -52,6 +52,10 @@ module.exports = class extends global.yoho.BaseModel {
params
.
inviteCode
=
inviteCode
;
}
if
(
other
.
udid
)
{
params
.
udid
=
other
.
udid
;
}
return
this
.
post
({
data
:
params
});
}
};
...
...
apps/product/models/list.js
View file @
934f100
...
...
@@ -176,8 +176,8 @@ function getListDataPre(params, channel) {
if
(
cdata
)
{
try
{
hasCache
=
true
;
cdata
=
JSON
.
parse
(
cdata
);
hasCache
=
true
;
}
catch
(
e
)
{
logger
.
debug
(
'list render cache data parse fail.'
);
}
...
...
@@ -297,8 +297,8 @@ function getListNewDataPre(params, channel) {
if
(
cdata
)
{
try
{
hasCache
=
true
;
cdata
=
JSON
.
parse
(
cdata
);
hasCache
=
true
;
}
catch
(
e
)
{
logger
.
debug
(
'list_new render cache data parse fail.'
);
}
...
...
apps/product/models/search.js
View file @
934f100
...
...
@@ -199,8 +199,8 @@ function getSearchDataPre(params, channel) {
if
(
cdata
)
{
try
{
hasCache
=
true
;
cdata
=
JSON
.
parse
(
cdata
);
hasCache
=
true
;
}
catch
(
e
)
{
logger
.
debug
(
'search render cache data parse fail.'
);
}
...
...
Please
register
or
login
to post a comment