Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
pisns-forum-api
Project
Project
Details
Activity
Releases
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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
scrmGroup
pisns-forum-api
Commits
e6914122
Commit
e6914122
authored
Jul 28, 2016
by
陈志良
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
测试
parent
9b6c0adf
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
util.js
app/utils/util.js
+2
-2
No files found.
app/utils/util.js
View file @
e6914122
...
@@ -130,7 +130,7 @@ function loadLevelFromAPI(ent_code,open_id,callback){
...
@@ -130,7 +130,7 @@ function loadLevelFromAPI(ent_code,open_id,callback){
var
key
=
'pisns-forum-thread:'
+
ent_code
+
':'
+
open_id
+
':exp'
;
var
key
=
'pisns-forum-thread:'
+
ent_code
+
':'
+
open_id
+
':exp'
;
redis
.
get
(
key
,
function
(
err
,
value
){
redis
.
get
(
key
,
function
(
err
,
value
){
if
(
value
)
{
if
(
value
)
{
return
callback
&&
callback
(
null
,
JSON
.
parse
(
value
)
||
null
);
return
callback
&&
callback
(
null
,
value
||
null
);
}
else
{
}
else
{
var
url
=
API_ADDRESS
+
'/v1.0/internal/member/exp/byopenid?openId='
+
open_id
+
'&entCode='
+
ent_code
;
var
url
=
API_ADDRESS
+
'/v1.0/internal/member/exp/byopenid?openId='
+
open_id
+
'&entCode='
+
ent_code
;
request
.
get
({
request
.
get
({
...
@@ -142,7 +142,7 @@ function loadLevelFromAPI(ent_code,open_id,callback){
...
@@ -142,7 +142,7 @@ function loadLevelFromAPI(ent_code,open_id,callback){
}
}
console
.
log
(
body
);
console
.
log
(
body
);
if
(
body
&&
body
.
data
&&
body
.
data
[
open_id
]){
if
(
body
&&
body
.
data
&&
body
.
data
[
open_id
]){
redis
.
set
(
key
,
JSON
.
stringify
(
body
.
data
)
);
redis
.
set
(
key
,
body
.
data
);
redis
.
expire
(
key
,
2
*
60
);
redis
.
expire
(
key
,
2
*
60
);
}
}
return
callback
&&
callback
(
null
,(
body
&&
body
.
data
)
||
null
);
return
callback
&&
callback
(
null
,(
body
&&
body
.
data
)
||
null
);
...
...
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