Authored by zhangxiaoru

editorial

@@ -196,7 +196,7 @@ let cancelPraise = (req, res, next) => { @@ -196,7 +196,7 @@ let cancelPraise = (req, res, next) => {
196 let addComment = (req, res, next) => { 196 let addComment = (req, res, next) => {
197 let uid = req.user.uid; 197 let uid = req.user.uid;
198 let id = req.body.id; 198 let id = req.body.id;
199 - let content = req.body.content; 199 + let content = req.body.comment;
200 200
201 editorialModel.addComment(id, uid, content).then((result) => { 201 editorialModel.addComment(id, uid, content).then((result) => {
202 res.json(result); 202 res.json(result);
@@ -19,7 +19,7 @@ $('.editorial-index-page').on('click', '.like-icon', function() { @@ -19,7 +19,7 @@ $('.editorial-index-page').on('click', '.like-icon', function() {
19 var $this = $(this), 19 var $this = $(this),
20 20
21 // prising = false, 21 // prising = false,
22 - msgId = $this.pardents('.msg-content').data('id'), 22 + msgId = $this.parents('.msg-content').data('id'),
23 url; 23 url;
24 24
25 // if (prising === msgId) { 25 // if (prising === msgId) {