Commit 440d4a7e authored by 刘文胜's avatar 刘文胜

Merge branch 'development' of git.wxpai.cn:scrmgroup/pisns-forum-api into development

parents db9cf846 0d65869c
...@@ -133,6 +133,7 @@ router.get('/info/:fid/threads', function(req, res, next) { ...@@ -133,6 +133,7 @@ router.get('/info/:fid/threads', function(req, res, next) {
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 fid = req.params.fid; var fid = req.params.fid;
var sort = 'top -topTime -created'
var conditions = { var conditions = {
ent_code: req.session.user.ent_code, ent_code: req.session.user.ent_code,
level: 1 level: 1
...@@ -165,7 +166,7 @@ router.get('/info/:fid/threads', function(req, res, next) { ...@@ -165,7 +166,7 @@ router.get('/info/:fid/threads', function(req, res, next) {
$nin: result.thread $nin: result.thread
}; };
} }
forumThreadService.getAllThreadByFid(conditions, pageNo, pageSize, null, function(err, results) { forumThreadService.getAllThreadByFid(conditions, pageNo, pageSize, sort, function(err, results) {
if (err) { if (err) {
console.error(err); console.error(err);
res.json(returnCode.BUSY); res.json(returnCode.BUSY);
......
...@@ -58,7 +58,7 @@ router.get('/tag/:tid/threads', function(req, res, next) { ...@@ -58,7 +58,7 @@ router.get('/tag/:tid/threads', function(req, res, next) {
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 tid=req.params.tid; var tid=req.params.tid;
var sort = req.query.sort || ''; var sort = 'tag_top -tag_topTime -created';
var conditions={ var conditions={
ent_code:req.session.user.ent_code ent_code:req.session.user.ent_code
}; };
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment