|
|
|
@ -24,7 +24,7 @@ import '../../forums/RightSection.css'
|
|
|
|
|
import './TopicDetail.css'
|
|
|
|
|
import '../common/courseMessage.css'
|
|
|
|
|
import { Pagination, Tooltip } from 'antd'
|
|
|
|
|
import { bytesToSize, ConditionToolTip, markdownToHTML, MarkdownToHtml } from 'educoder'
|
|
|
|
|
import { bytesToSize, ConditionToolTip, markdownToHTML, MarkdownToHtml , setImagesUrl } from 'educoder'
|
|
|
|
|
import SendToCourseModal from '../coursesPublic/modal/SendToCourseModal'
|
|
|
|
|
import CBreadcrumb from '../common/CBreadcrumb'
|
|
|
|
|
import { generateComments, generateChildComments, _findById, handleContentBeforeCreateNew, addNewComment
|
|
|
|
@ -57,6 +57,7 @@ class TopicDetail extends Component {
|
|
|
|
|
pageCount: 1,
|
|
|
|
|
comments: [],
|
|
|
|
|
goldRewardDialogOpen: false,
|
|
|
|
|
author:undefined
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
componentDidMount() {
|
|
|
|
@ -85,7 +86,8 @@ class TopicDetail extends Component {
|
|
|
|
|
memo: Object.assign({}, {
|
|
|
|
|
...response.data.data,
|
|
|
|
|
replies_count: response.data.data.total_replies_count
|
|
|
|
|
}, {...this.state.memo})
|
|
|
|
|
}, {...this.state.memo}),
|
|
|
|
|
author:response.data.data.author
|
|
|
|
|
}, () => {
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
@ -514,7 +516,7 @@ class TopicDetail extends Component {
|
|
|
|
|
render() {
|
|
|
|
|
const { match, history } = this.props
|
|
|
|
|
const { recommend_shixun, current_user,author_info } = this.props;
|
|
|
|
|
const { memo, comments, hasMoreComments, goldRewardDialogOpen, pageCount, total_count } = this.state;
|
|
|
|
|
const { memo, comments, hasMoreComments, goldRewardDialogOpen, pageCount, total_count , author } = this.state;
|
|
|
|
|
const messageId = match.params.topicId
|
|
|
|
|
if (this.state.memoLoading || !current_user) {
|
|
|
|
|
return <div className="edu-back-white" id="forum_index_list"></div>
|
|
|
|
@ -599,11 +601,12 @@ class TopicDetail extends Component {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
<div className="color-grey-9 clearfix">
|
|
|
|
|
<span className="fl" style={{marginTop: "2px"}}>{moment(memo.created_on).fromNow()} 发布</span>
|
|
|
|
|
<div className="fr">
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
<div className="df mt20">
|
|
|
|
|
<img src={setImagesUrl(`/images/${author && author.image_url}`)} className="radius mr10 mt2" width="40px" height="40px"/>
|
|
|
|
|
<div className="flex1">
|
|
|
|
|
<div className="color-grey-9 lineh-20">
|
|
|
|
|
<span class="color-grey-3 mr20 fl" style={{"fontWeight":"400"}}>{author && author.name}</span>
|
|
|
|
|
<span className="fl">{moment(memo.created_on).fromNow()} 发布</span>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div className="color-grey-9 clearfix">
|
|
|
|
@ -645,6 +648,8 @@ class TopicDetail extends Component {
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div className="padding30 memoContent new_li" style={{ paddingBottom: '10px'}}>
|
|
|
|
|