Commit 60c8e79c authored by 陈家荣's avatar 陈家荣

update sort

parent 96411480
...@@ -403,10 +403,7 @@ router.get('/threads/list', function(req, res, next) { ...@@ -403,10 +403,7 @@ router.get('/threads/list', function(req, res, next) {
var title = req.query.title; var title = req.query.title;
var sortBy = { var sortBy = {
top:-1, top:-1,
// top_order_idx:-1,
topTime:-1, topTime:-1,
tag_top:-1,
tag_topTime:-1,
quality:-1, quality:-1,
created:-1 created:-1
}; };
...@@ -424,6 +421,12 @@ router.get('/threads/list', function(req, res, next) { ...@@ -424,6 +421,12 @@ router.get('/threads/list', function(req, res, next) {
conditions.tag = { conditions.tag = {
$in: [tagId] $in: [tagId]
}; };
sortBy = {
top:-1,
topTime:-1,
quality:-1,
created:-1
}
} }
if (pid) { if (pid) {
conditions.pid = pid; conditions.pid = pid;
...@@ -451,20 +454,16 @@ router.get('/threads/list', function(req, res, next) { ...@@ -451,20 +454,16 @@ router.get('/threads/list', function(req, res, next) {
if(recommend_threads){//推荐贴 if(recommend_threads){//推荐贴
conditions.new_recommend = 1; conditions.new_recommend = 1;
sortBy = { sortBy = {
new_recommend:-1,
new_recommend_order_idx:-1, new_recommend_order_idx:-1,
new_recommend_time:-1,
top:-1,
// top_order_idx:-1,
topTime:-1,
tag_top:-1,
tag_topTime:-1,
quality:-1,
created:-1 created:-1
}; };
} }
if(top_threads){//置顶帖 if(top_threads){//置顶帖
conditions.top = 1; conditions.top = 1;
sortBy = {
top_order_idx:-1,
created:-1
};
} }
if (eventStatus) { if (eventStatus) {
......
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