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
8ee5bd76
Commit
8ee5bd76
authored
Apr 01, 2016
by
strong
Browse files
Options
Browse Files
Download
Plain Diff
Merge commit '
23a191fc
' into SANDBOX
parents
b3598c2c
23a191fc
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
2 deletions
+16
-2
forumInfo.js
app/controllers/mobile/forumInfo.js
+16
-2
No files found.
app/controllers/mobile/forumInfo.js
View file @
8ee5bd76
...
...
@@ -495,8 +495,23 @@ router.get('/info/myThreads', function(req, res, next) {
console
.
error
(
err
);
res
.
json
(
returnCode
.
BUSY
);
}
else
{
//判断是否已经点赞
util
.
loadLevel
(
req
.
session
.
user
.
ent_code
,
results
.
items
,
function
()
{
res
.
json
(
_
.
assign
(
results
,
returnCode
.
SUCCESS
));
redisPraiseLog
.
get
(
req
.
session
.
user
.
ent_code
,
user
.
getMobileUser
(
req
),
'thread'
,
function
(
error
,
docs
)
{
_
.
forEach
(
results
.
items
,
function
(
d
,
i
)
{
if
(
results
.
items
[
i
].
toObject
)
{
results
.
items
[
i
]
=
results
.
items
[
i
].
toObject
();
}
results
.
items
[
i
].
isPraise
=
false
;
for
(
var
k
=
docs
.
length
-
1
;
k
>=
0
;
k
--
)
{
if
(
results
.
items
[
i
].
_id
==
docs
[
k
])
{
results
.
items
[
i
].
isPraise
=
true
;
break
;
}
};
});
res
.
json
(
_
.
assign
(
results
,
returnCode
.
SUCCESS
));
});
});
}
...
...
@@ -854,7 +869,6 @@ router.get('/info/list/allWithThreadCount', function(req, res, next) {
if
(
infos
[
i
].
toObject
)
{
infos
[
i
]
=
infos
[
i
].
toObject
();
}
console
.
log
(
count
);
infos
[
i
].
favor_by
=
count
;
cont
(
null
,
info
);
}
...
...
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