Authored by 张文文

回复评论接口参数修改 reviewd by 朱傲哲

@@ -81,9 +81,9 @@ class ContentMessageContainer extends Component { @@ -81,9 +81,9 @@ class ContentMessageContainer extends Component {
81 _addArticleCommentAction(addValue) { 81 _addArticleCommentAction(addValue) {
82 82
83 let addType = this.state.dataSource.businessType === 1003 ? 1 : 0; 83 let addType = this.state.dataSource.businessType === 1003 ? 1 : 0;
84 - let destId = addType === 0 ? this.state.dataSource.articleId : 0;  
85 - let commentId = this.state.dataSource.commentId;  
86 - let columnType = addType === 0 ? 1001 : 0; 84 + let destId = addType === 0 ? this.state.dataSource.articleId : null;
  85 + let commentId = addType === 0 ? null : this.state.dataSource.parentCommentId;
  86 + let columnType = addType === 0 ? 1001 : null;
87 87
88 this.props.actions.addArticleCommentAction(addValue, destId, commentId, addType, columnType); 88 this.props.actions.addArticleCommentAction(addValue, destId, commentId, addType, columnType);
89 } 89 }
@@ -50,17 +50,15 @@ export default class ContentService { @@ -50,17 +50,15 @@ export default class ContentService {
50 50
51 //评论(回复)接口 51 //评论(回复)接口
52 async addArticleComment(content, destId, uid, commentId, addType, columnType) { 52 async addArticleComment(content, destId, uid, commentId, addType, columnType) {
  53 +
  54 + let method = 'app.grass.addArticleComment';
  55 + let body = {};
  56 +
  57 + addType === 0 ? body = {content, destId, addType, columnType, uid, method} : body = {content, addType, uid, commentId, method};
  58 +
53 return await this.api.get({ 59 return await this.api.get({
54 url: '', 60 url: '',
55 - body: {  
56 - content,  
57 - destId,  
58 - commentId,  
59 - addType,  
60 - columnType,  
61 - uid,  
62 - method: 'app.grass.addArticleComment',  
63 - } 61 + body: body
64 }) 62 })
65 .then(json => { 63 .then(json => {
66 return json 64 return json