Toggle navigation
Toggle navigation
This project
Loading...
Sign in
fe
/
yohoblk-wap
·
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
李奇
7 years ago
Commit
0692529d0bfb738150007152ae09cc7bc7f0f5d4
1 parent
c21da277
Revert "去除老的_YOHOUID、_YOHOTOKEN先关逻辑"
This reverts commit
5b299241
.
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
0 deletions
doraemon/middleware/user.js
doraemon/middleware/user.js
View file @
0692529
...
...
@@ -4,6 +4,15 @@ const config = global.yoho.config;
module
.
exports
=
()
=>
{
return
(
req
,
res
,
next
)
=>
{
const
uid
=
req
.
cookies
.
_YOHOUID
;
const
token
=
req
.
cookies
.
_YOHOTOKEN
;
const
key
=
`
-
_
-!!!
$
{
uid
}
!!!-
_
-
`
;
if
(
md5
(
key
)
===
token
)
{
req
.
user
.
uid
=
uid
;
delete
req
.
cookies
.
_YOHOUID
;
}
// app 内处理
if
(
req
.
yoho
.
isApp
)
{
if
(
req
.
cookies
.
app_uid
&&
...
...
Please
register
or
login
to post a comment