Commit ea22a43b authored by 陈志良's avatar 陈志良

去除打印

parent 37a1a073
......@@ -454,7 +454,7 @@ router.get('/info/:tid/comment/list', function(req, res, next) {
}
forumCommentService.getAllCommentByThread(conditions, function(err, results) {
if (err) {
console.log(err);
console.error(err);
res.json(returnCode.BUSY);
} else {
var docs =[];
......@@ -465,7 +465,6 @@ router.get('/info/:tid/comment/list', function(req, res, next) {
if(doc.comments && doc.comments.length>0){//有子评论
var comments = [];
doc.comments.forEach(function(comment,j){
console.log((comment.from && comment.from._id == id),(comment.to && comment.to._id == id),id);
if((comment.from && comment.from._id == id) || (comment.to && comment.to._id == id)){
//二级评论的作者 或 被评论者是自己
comments.push(comment);
......@@ -486,7 +485,6 @@ router.get('/info/:tid/comment/list', function(req, res, next) {
obj.pageNo=pageNo;
obj.pageSize=pageSize;
obj.items=docs.slice((pageNo-1>=0?pageNo-1:0)*pageSize,pageSize);
console.log(obj.items);
res.json(_.assign(obj, returnCode.SUCCESS));
}
});
......
......@@ -520,7 +520,6 @@ router.post('/thread/:tid/comment/add', function(req, res, next) {
if (content) { //评论不能为空
//2.获取论坛文章
forumThreadService.getThreadById(tid, function(err, thread) {
console.log(err);
if (err) {
res.json(returnCode.BUSY);
} else {
......@@ -543,7 +542,6 @@ router.post('/thread/:tid/comment/add', function(req, res, next) {
};
forumCommentService.count(conditions, function(err, count) {
if (err) {
console.log(err);
callback(err, null);
} else {
// callback(null, count);
......@@ -560,9 +558,6 @@ router.post('/thread/:tid/comment/add', function(req, res, next) {
forumThreadAttendService.threadAttend(thread._id,user.getMobileUser(req),function(err){});
}
var comments = thread.comments;
// console.log('=========');
// console.log(comments);
// console.log('=========');
var array = [];
if (comments && comments.items && comments.items.length > 0) {
array = comments.items;
......@@ -587,7 +582,6 @@ router.post('/thread/:tid/comment/add', function(req, res, next) {
if (thread) {
forumThreadService.updateThreadCommentCountInc(tid, function(err, results) {
if (err) {
console.log(err);
callback(err, null);
} else {
callback(null, null);
......@@ -615,8 +609,6 @@ router.post('/thread/:tid/comment/add', function(req, res, next) {
if (err) {
res.json(returnCode.BUSY);
} else {
console.log(c);
var rs = {};
rs.data = c;
res.json(_.assign(rs, returnCode.SUCCESS));
......
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