|
|
@ -68,6 +68,8 @@ class CommonReply extends Component{
|
|
|
|
|
|
|
|
|
|
|
|
if (response.data && response.data.id) {
|
|
|
|
if (response.data && response.data.id) {
|
|
|
|
const _id = response.data.id;
|
|
|
|
const _id = response.data.id;
|
|
|
|
|
|
|
|
let mycontent= response.data.content;
|
|
|
|
|
|
|
|
|
|
|
|
// md
|
|
|
|
// md
|
|
|
|
editor.setValue && editor.setValue('')
|
|
|
|
editor.setValue && editor.setValue('')
|
|
|
|
this.refs.editor.close && this.refs.editor.close()
|
|
|
|
this.refs.editor.close && this.refs.editor.close()
|
|
|
@ -76,7 +78,7 @@ class CommonReply extends Component{
|
|
|
|
const isSuperAdmin = this.props.isSuperAdmin()
|
|
|
|
const isSuperAdmin = this.props.isSuperAdmin()
|
|
|
|
|
|
|
|
|
|
|
|
this.setState({
|
|
|
|
this.setState({
|
|
|
|
comments: addNewComment(this.state.comments, _id, content, user, isSuperAdmin, this),
|
|
|
|
comments: addNewComment(this.state.comments, _id, mycontent, user, isSuperAdmin, this),
|
|
|
|
total_count: this.state.total_count + 1
|
|
|
|
total_count: this.state.total_count + 1
|
|
|
|
})
|
|
|
|
})
|
|
|
|
this.refs.editor.showEditor();
|
|
|
|
this.refs.editor.showEditor();
|
|
|
@ -121,12 +123,13 @@ class CommonReply extends Component{
|
|
|
|
).then((response) => {
|
|
|
|
).then((response) => {
|
|
|
|
if (response.data.id) {
|
|
|
|
if (response.data.id) {
|
|
|
|
let newId = response.data.id;
|
|
|
|
let newId = response.data.id;
|
|
|
|
|
|
|
|
let mycontent= response.data.content;
|
|
|
|
|
|
|
|
|
|
|
|
const newMemo2 = Object.assign({}, this.props.memo);
|
|
|
|
const newMemo2 = Object.assign({}, this.props.memo);
|
|
|
|
newMemo2.total_count = newMemo2.total_count + 1;
|
|
|
|
newMemo2.total_count = newMemo2.total_count + 1;
|
|
|
|
|
|
|
|
|
|
|
|
this.setState({
|
|
|
|
this.setState({
|
|
|
|
comments: addSecondLevelComment(comments, comment, commentIndex, newId, commentContent, user, editor),
|
|
|
|
comments: addSecondLevelComment(comments, comment, commentIndex, newId, mycontent, user, editor),
|
|
|
|
memo: newMemo2,
|
|
|
|
memo: newMemo2,
|
|
|
|
total_count: this.state.total_count + 1
|
|
|
|
total_count: this.state.total_count + 1
|
|
|
|
|
|
|
|
|
|
|
|