Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Z
zhichan
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
蒋勇
zhichan
Commits
897161ac
Commit
897161ac
authored
Jun 04, 2020
by
孙亚楠
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d
parent
1433c10a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
0 deletions
+5
-0
xgg-saas-merchant/app/base/service/impl/uc/merchantappletuserSve.js
+5
-0
No files found.
xgg-saas-merchant/app/base/service/impl/uc/merchantappletuserSve.js
View file @
897161ac
...
@@ -19,15 +19,20 @@ class MerchantAppletuserService extends ServiceBase {
...
@@ -19,15 +19,20 @@ class MerchantAppletuserService extends ServiceBase {
let
key
=
"applet_login_"
+
params
.
merchant_id
+
"_"
+
params
.
openid
;
let
key
=
"applet_login_"
+
params
.
merchant_id
+
"_"
+
params
.
openid
;
try
{
try
{
let
user
=
await
this
.
redisClient
.
get
(
key
);
let
user
=
await
this
.
redisClient
.
get
(
key
);
console
.
log
(
`getLoginUser key =
${
key
}
, user =
${
user
}
`
);
if
(
!
user
)
{
if
(
!
user
)
{
console
.
log
(
`1`
);
let
appletUserInfo
=
await
this
.
callms
(
"uc"
,
"appletUserInfo"
,
params
)
||
{};
let
appletUserInfo
=
await
this
.
callms
(
"uc"
,
"appletUserInfo"
,
params
)
||
{};
user
=
appletUserInfo
.
data
;
user
=
appletUserInfo
.
data
;
console
.
log
(
"getLoginUser result"
,
params
,
user
);
if
(
user
)
{
if
(
user
)
{
console
.
log
(
`2`
);
await
this
.
redisClient
.
setWithEx
(
key
,
JSON
.
stringify
(
user
),
60
*
33
);
await
this
.
redisClient
.
setWithEx
(
key
,
JSON
.
stringify
(
user
),
60
*
33
);
}
}
}
else
{
}
else
{
user
=
JSON
.
parse
(
user
);
user
=
JSON
.
parse
(
user
);
}
}
console
.
log
(
"getLoginUser return user"
,
params
,
user
);
return
user
;
return
user
;
}
catch
(
error
)
{
}
catch
(
error
)
{
return
system
.
getResult
(
null
,
`系统错误 错误信息
${
error
}
`
);
return
system
.
getResult
(
null
,
`系统错误 错误信息
${
error
}
`
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment