Commit 6b8aa6c8 authored by 陈家荣's avatar 陈家荣

11

parent 53870e71
......@@ -429,13 +429,18 @@ router.post('/thread/:tid/comment/create', function(req, res, next) {
} else {
async.parallel([
function(callback) {
var floor = 1;
if(thread.comments){
floor = thread.comments.length + 1;
}
var entity = {
ent_code: req.session.user.ent_code,
from: user.getMobileUser(req),
content: content,
ip: req.ip,
thread: thread,
level: '1'
level: '1',
floor: floor
};
//4.创建文章评论
forumCommentService.createComment(entity, function(err, newComment) {
......@@ -1013,3 +1018,5 @@ router.get('/thread/:tid/hotPhotos', function(req, res, next) {
res.json(returnCode.WRONG_PARAM);
}
});
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