dev_local_scyd
杨树林 5 years ago
parent fc4a68932c
commit fac2c50d17

@ -344,12 +344,14 @@ class TopicDetail extends Component {
).then((response) => {
if (response.data.data.id) {
let newId = response.data.data.id;
const commentIndex = this._findById(id, comments);
let mycontent = response.data.data.content;
const commentIndex = this._findById(id, comments);
const parentComment = comments[commentIndex]
this.setState({
// runTesting: false,
comments: addSecondLevelComment(comments, parentComment, commentIndex, newId, commentContent, user, editor)
comments: addSecondLevelComment(comments, parentComment, commentIndex, newId, mycontent, user, editor)
}, ()=>{
// keditor代码美化
editor.html && window.prettyPrint()
@ -409,6 +411,7 @@ class TopicDetail extends Component {
if (response.data) {
const _id = response.data.data.id;
let mycontent=response.data.data.content;
// ke
editor.html && editor.html('');
editor.afterBlur && editor.afterBlur()
@ -418,7 +421,7 @@ class TopicDetail extends Component {
const user = this._getUser();
this.setState({
comments: addNewComment(comments, _id, content, user, this.props.isSuperAdmin(), this)
comments: addNewComment(comments, _id, mycontent, user, this.props.isSuperAdmin(), this)
})
const newMemo2 = Object.assign({}, this.state.memo);
newMemo2.total_replies_count = newMemo2.total_replies_count + 1;

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

@ -68,12 +68,14 @@ class GraduationTaskssettingReply extends Component{
if (response.data && response.data.id) {
const _id = response.data.id;
// md
let mycontent= response.data.content;
// md
editor.setValue && editor.setValue('')
const user = this._getUser();
this.setState({
comments: addNewComment(this.state.comments, _id, content, user, this.props.isSuperAdmin(), this),
comments: addNewComment(this.state.comments, _id, mycontent, user, this.props.isSuperAdmin(), this),
total_count: this.state.total_count + 1
})
this.refs.editor.showEditor();
@ -117,9 +119,10 @@ class GraduationTaskssettingReply extends Component{
).then((response) => {
if (response.data.id) {
let newId = response.data.id;
let mycontent= response.data.content;
this.setState({
comments: addSecondLevelComment(comments, comment, commentIndex, newId, commentContent, user, editor)
comments: addSecondLevelComment(comments, comment, commentIndex, newId, mycontent, user, editor)
})
const newMemo2 = Object.assign({}, this.props.memo);

@ -62,12 +62,13 @@ class GraduateTopicReply extends Component{
if (response.data && response.data.id) {
const _id = response.data.id;
let mycontent= response.data.content;
// md
editor.setValue && editor.setValue('')
const user = this._getUser();
this.setState({
comments: addNewComment(this.state.comments, _id, content, user, this.props.isSuperAdmin(), this),
comments: addNewComment(this.state.comments, _id, mycontent, user, this.props.isSuperAdmin(), this),
total_count: this.state.total_count + 1
})
this.refs.editor.showEditor();
@ -111,9 +112,10 @@ class GraduateTopicReply extends Component{
).then((response) => {
if (response.data.id) {
let newId = response.data.id;
let mycontent= response.data.content;
this.setState({
comments: addSecondLevelComment(comments, comment, commentIndex, newId, commentContent, user, editor)
comments: addSecondLevelComment(comments, comment, commentIndex, newId, mycontent, user, editor)
})
const newMemo2 = Object.assign({}, this.props.memo);

Loading…
Cancel
Save