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
7c2577cf
Commit
7c2577cf
authored
Mar 15, 2016
by
陈家荣
1
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
获取最热最新照片墙时获取点赞数据
parent
3f7c8125
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
34 additions
and
6 deletions
+34
-6
forumThread.js
app/controllers/mobile/forumThread.js
+34
-6
No files found.
app/controllers/mobile/forumThread.js
View file @
7c2577cf
...
@@ -1746,9 +1746,9 @@ router.get('/thread/:tid/latestPhotos', function(req, res, next) {
...
@@ -1746,9 +1746,9 @@ router.get('/thread/:tid/latestPhotos', function(req, res, next) {
var
tid
=
req
.
params
.
tid
||
null
;
var
tid
=
req
.
params
.
tid
||
null
;
var
pageNo
=
req
.
query
.
pageNo
||
1
;
var
pageNo
=
req
.
query
.
pageNo
||
1
;
var
pageSize
=
req
.
query
.
pageSize
||
10
;
var
pageSize
=
req
.
query
.
pageSize
||
10
;
var
ent_code
=
req
.
session
.
user
.
ent_code
;
var
conditions
=
{
var
conditions
=
{
ent_code
:
req
.
session
.
user
.
ent_code
,
ent_code
:
ent_code
,
pid
:
tid
,
pid
:
tid
,
type
:
3
,
type
:
3
,
status
:
1
,
status
:
1
,
...
@@ -1791,7 +1791,21 @@ router.get('/thread/:tid/latestPhotos', function(req, res, next) {
...
@@ -1791,7 +1791,21 @@ router.get('/thread/:tid/latestPhotos', function(req, res, next) {
console
.
error
(
err
);
console
.
error
(
err
);
res
.
json
(
returnCode
.
BUSY
);
res
.
json
(
returnCode
.
BUSY
);
}
else
{
}
else
{
res
.
json
(
_
.
assign
(
results
,
returnCode
.
SUCCESS
));
redisPraiseLog
.
get
(
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
));
});
}
}
});
});
}
}
...
@@ -1806,9 +1820,9 @@ router.get('/thread/:tid/hotPhotos', function(req, res, next) {
...
@@ -1806,9 +1820,9 @@ router.get('/thread/:tid/hotPhotos', function(req, res, next) {
var
tid
=
req
.
params
.
tid
||
null
;
var
tid
=
req
.
params
.
tid
||
null
;
var
pageNo
=
req
.
query
.
pageNo
||
1
;
var
pageNo
=
req
.
query
.
pageNo
||
1
;
var
pageSize
=
req
.
query
.
pageSize
||
10
;
var
pageSize
=
req
.
query
.
pageSize
||
10
;
var
ent_code
=
req
.
session
.
user
.
ent_code
;
var
conditions
=
{
var
conditions
=
{
ent_code
:
req
.
session
.
user
.
ent_code
,
ent_code
:
ent_code
,
pid
:
tid
,
pid
:
tid
,
type
:
3
,
type
:
3
,
status
:
1
,
status
:
1
,
...
@@ -1851,7 +1865,21 @@ router.get('/thread/:tid/hotPhotos', function(req, res, next) {
...
@@ -1851,7 +1865,21 @@ router.get('/thread/:tid/hotPhotos', function(req, res, next) {
console
.
error
(
err
);
console
.
error
(
err
);
res
.
json
(
returnCode
.
BUSY
);
res
.
json
(
returnCode
.
BUSY
);
}
else
{
}
else
{
res
.
json
(
_
.
assign
(
results
,
returnCode
.
SUCCESS
));
redisPraiseLog
.
get
(
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
));
});
}
}
});
});
}
}
...
...
strong
@strong
mentioned in commit
150c0643
·
Mar 15, 2016
mentioned in commit
150c0643
mentioned in commit 150c06432d291982a20a97e6a03f85b45d650c8a
Toggle commit list
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