Commit 40607f9e authored by 刘文胜's avatar 刘文胜

排序方式

parent 2e6c2a55
...@@ -46,7 +46,8 @@ router.get('/threadManagement/threads/list', function(req, res, next) { ...@@ -46,7 +46,8 @@ router.get('/threadManagement/threads/list', function(req, res, next) {
created:asc created:asc
}; };
if(req.query.sort){//指定排序字段 if(req.query.sort){//指定排序字段
sortBy = ({}[req.query.sort] = asc); sortBy = {};
sortBy[req.query.sort] = asc;
} }
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