Commit 69593fe8 authored by 张淼's avatar 张淼

1

parent 6a140a9e
......@@ -68,6 +68,7 @@ exports.getThreadById=function(tid,callback){
console.error(err);
cb(err,null);
}else{
// console.log(threads);
cb(null,threads);
}
});
......@@ -157,6 +158,7 @@ function populateComment(doc, callback){
console.error(err);
callback(null, null);
} else{
console.log(comment);
if(comment.comments){
populateSubComment(comment,function(err, results){
if(err){
......@@ -300,7 +302,8 @@ function getAllThreadByFidHelp(conditions,pageNo,pageSize,sort,callback){
var asyncTasks = [];
docs.forEach(function(doc){
if(doc.type===1){
console.log(doc);
if(doc.type===1 || doc.level!==1){//非照片墙或文章时获取评论
asyncTasks.push(function(callback) {
populateComment(doc, callback);
});
......
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