Commit 472a46e9 authored by 刘文胜's avatar 刘文胜

111

parent d21d7ee8
......@@ -17,7 +17,7 @@ router.get('/commentTips', function(req, res, next) {
if(err){
res.json(returnCode.UNCHECK_ERROR(err));
}else{
res.json(_.assign(result, returnCode.SUCCESS));
res.json(_.assign({data:result}, returnCode.SUCCESS));
}
});
});
......@@ -29,7 +29,7 @@ router.put('/commentTips/:id', function(req, res, next) {
if(err){
res.json(returnCode.UNCHECK_ERROR(err));
}else{
res.json(_.assign(result, returnCode.SUCCESS));
res.json(_.assign({data:result}, returnCode.SUCCESS));
}
});
});
......@@ -41,7 +41,7 @@ router.post('/commentTips/del', function(req, res, next) {
if(err){
res.json(returnCode.UNCHECK_ERROR(err));
}else{
res.json(_.assign(result, returnCode.SUCCESS));
res.json(_.assign({data:result}, returnCode.SUCCESS));
}
});
});
\ No newline at end of file
......@@ -14,7 +14,7 @@ var forumShareLogService = require('../../service/forumShareLogService');
var forumCommentService = require('../../service/forumCommentService');
var forumUserThreadControlService = require('../../service/forumUserThreadControlService');
var forumLimitActionRefService = require('../../service/forumLimitActionRefService');
var commentTips = require('../../utils/commentTips');
var httpService = require('../../service/httpService');
var user = require('../../utils/user');
......@@ -508,6 +508,10 @@ router.post('/thread/:tid/comment/add', function(req, res, next) {
if (err) {
callback(err, null);
} else {
if(user.getMobileUser(req) !== thread.from){//文章的作者不等于评论的作者才增加消息数
commentTips.incrTips(req.session.user.ent_code,thread.from);
}
data = newComment ;
var comments = thread.comments;
// console.log('=========');
......@@ -645,6 +649,9 @@ router.post('/thread/:tid/comment/create', function(req, res, next) {
if (err) {
callback(err, null);
} else {
if(user.getMobileUser(req) !== thread.from){//文章的作者不等于评论的作者才增加消息数
commentTips.incrTips(req.session.user.ent_code,thread.from);
}
var comments = thread.comments;
// console.log('=========');
// console.log(comments);
......@@ -803,6 +810,9 @@ router.post('/thread/:tid/comment/:cid/create', function(req, res, next) {
if (err) {
callback(err, null);
} else {
if(user.getMobileUser(req) !== req.body.to){//被评论人 和评论人不是同一个
commentTips.incrTips(req.session.user.ent_code,req.body.to);
}
var comments = comment.comments;
var array = [];
if (comments && comments.length > 0) {
......
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