|
|
|
@ -1,13 +1,17 @@
|
|
|
|
|
import React, { Component } from 'react';
|
|
|
|
|
|
|
|
|
|
import { Link } from "react-router-dom";
|
|
|
|
|
|
|
|
|
|
import axios from 'axios'
|
|
|
|
|
import moment from 'moment'
|
|
|
|
|
import Comments from '../comment/Comments'
|
|
|
|
|
import update from 'immutability-helper'
|
|
|
|
|
import RewardDialog from '../common/RewardDialog';
|
|
|
|
|
import ImageLayerOfCommentHOC from '../page/layers/ImageLayerOfCommentHOC'
|
|
|
|
|
|
|
|
|
|
import MemoDetailKEEditor from './MemoDetailKEEditor'
|
|
|
|
|
import MemoDetailMDEditor from './MemoDetailMDEditor'
|
|
|
|
|
|
|
|
|
|
import { CBreadcrumb, htmlEncode } from 'educoder'
|
|
|
|
|
import { Tooltip } from 'antd'
|
|
|
|
|
|
|
|
|
@ -652,7 +656,7 @@ class MemoDetail extends Component {
|
|
|
|
|
// --------------------------------------------------------------------------------------------帖子獎勵 END
|
|
|
|
|
showCommentInput = () => {
|
|
|
|
|
|
|
|
|
|
debugger
|
|
|
|
|
|
|
|
|
|
if (window.__useKindEditor === true) {
|
|
|
|
|
this.refs.editor.showEditor();
|
|
|
|
|
} else {
|
|
|
|
@ -667,15 +671,9 @@ class MemoDetail extends Component {
|
|
|
|
|
if (!memo || this.state.memoLoading) {
|
|
|
|
|
return <div className="edu-back-white" id="forum_index_list"></div>
|
|
|
|
|
}
|
|
|
|
|
// --------------------------------------------------------------------------------------------帖子獎勵 END
|
|
|
|
|
showCommentInput = () => {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (window.__useKindEditor === true) {
|
|
|
|
|
this.refs.editor.showEditor();
|
|
|
|
|
} else {
|
|
|
|
|
this.refs.editor.showEditor();
|
|
|
|
|
}
|
|
|
|
|
let _current_user = {}
|
|
|
|
|
if (current_user) {
|
|
|
|
|
_current_user = current_user
|
|
|
|
|
}
|
|
|
|
|
(_current_user.user_url = `/users/${_current_user.login}`);
|
|
|
|
|
memo.isDetailPage = true;
|
|
|
|
@ -839,30 +837,11 @@ class MemoDetail extends Component {
|
|
|
|
|
</div>}
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<Comments comments={comments} user={_current_user}
|
|
|
|
|
replyComment={this.replyComment}
|
|
|
|
|
deleteComment={this.deleteComment}
|
|
|
|
|
commentPraise={this.commentPraise}
|
|
|
|
|
rewardCode={this.rewardCode}
|
|
|
|
|
hiddenComment={this.hiddenComment}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
></Comments>
|
|
|
|
|
{hasMoreComments ?
|
|
|
|
|
<div className="memoMore" style={{ cursor: 'default' }}>
|
|
|
|
|
<a onClick={this.moreMemos}>查看更多评论</a>
|
|
|
|
|
<div className="writeCommentBtn" onClick={this.showCommentInput}>写评论</div>
|
|
|
|
|
</div>
|
|
|
|
|
:
|
|
|
|
|
<div className="memoMore">
|
|
|
|
|
<div className="writeCommentBtn" onClick={this.showCommentInput}>写评论</div>
|
|
|
|
|
</div>}
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
</React.Fragment >
|
|
|
|
|
</React.Fragment>
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|