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
htoooth
9 years ago
Commit
50c34ffae26356f37517bae5e3b176f3305036e7
1 parent
d188836f
fix buy
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
1 additions
and
10 deletions
apps/passport/auth.js
apps/passport/controllers/login.js
doraemon/views/partial/header.hbs
apps/passport/auth.js
View file @
50c34ff
...
...
@@ -52,12 +52,6 @@ passport.use('local', new LocalStrategy({
return
done
({
message
:
'登录账号格式错误'
},
null
);
}
let
expire
=
req
.
cookies
[
'LE'
+
md5
(
'_LOGIN_EXPIRE'
)];
if
(
_
.
isEmpty
(
expire
)
||
expire
<
(
new
Date
()).
getTime
()
/
1000
)
{
return
done
({
message
:
'页面停留时间过长,请刷新页面'
},
null
);
}
let
verifyCode
=
req
.
body
.
captcha
;
if
(
verifyCode
&&
verifyCode
!==
req
.
session
.
captcha
)
{
...
...
apps/passport/controllers/login.js
View file @
50c34ff
...
...
@@ -107,9 +107,6 @@ const local = {
domain
:
'yohobuy.com'
});
// 设置登录有效时间30分钟, 防机器刷,cache不稳定,改为cookie
res
.
cookie
(
'LE'
+
md5
(
'_LOGIN_EXPIRE'
),
(
new
Date
()).
getTime
()
/
1000
+
1800
);
// 清除cookie
res
.
clearCookie
(
'_UID'
,
{
domain
:
'yohobuy.com'
...
...
doraemon/views/partial/header.hbs
View file @
50c34ff
...
...
@@ -253,7 +253,7 @@
</div>
<div class="go-full-cart">
<div>
<a href="/shopping/cart">去购物车结算</a>
<a href="/
/www.yohobuy.com/
shopping/cart">去购物车结算</a>
</div>
</div>
</div>
...
...
Please
register
or
login
to post a comment