Commit 56207bbb authored by 陈家荣's avatar 陈家荣

Merge branch 'newfunc_0510_forum_management' into SANDBOX

parents a16ffc85 7a830302
......@@ -951,23 +951,8 @@ router.get('/threadManagement/threads/:tid/comment/search', function(req, res, n
} else {
//判断是否已经点赞
util.loadLevel(ent_code, results.items, function() {
redisPraiseLog.get(ent_code, user.getMobileUser(req), 'comment', 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));
});
res.json(_.assign(results, returnCode.SUCCESS));
});
// res.json(_.assign(results, returnCode.SUCCESS));
}
});
} else if(tid){
......@@ -978,23 +963,8 @@ router.get('/threadManagement/threads/:tid/comment/search', function(req, res, n
} else {
//判断是否已经点赞
util.loadLevel(ent_code, results.items, function() {
redisPraiseLog.get(ent_code, user.getMobileUser(req), 'comment', 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));
});
res.json(_.assign(results, returnCode.SUCCESS));
});
// res.json(_.assign(results, returnCode.SUCCESS));
}
});
} else {
......
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