diff --git a/public/react/src/common/educoder.js b/public/react/src/common/educoder.js index c4988dce2..b0ef6d692 100644 --- a/public/react/src/common/educoder.js +++ b/public/react/src/common/educoder.js @@ -3,22 +3,22 @@ // export { default as OrderStateUtil } from '../routes/Order/components/OrderStateUtil'; export { getImageUrl as getImageUrl, getRandomNumber as getRandomNumber,getUrl as getUrl, publicSearchs as publicSearchs,getRandomcode as getRandomcode,getUrlmys as getUrlmys, getUrl2 as getUrl2, setImagesUrl as setImagesUrl - , getUploadActionUrl as getUploadActionUrl,getUploadActionUrltwo as getUploadActionUrltwo ,getUploadActionUrlthree as getUploadActionUrlthree, getUploadActionUrlOfAuth as getUploadActionUrlOfAuth - , getTaskUrlById as getTaskUrlById, TEST_HOST ,htmlEncode as htmlEncode ,getupload_git_file as getupload_git_file} from './UrlTool'; + , getUploadActionUrl as getUploadActionUrl,getUploadActionUrltwo as getUploadActionUrltwo ,getUploadActionUrlthree as getUploadActionUrlthree, getUploadActionUrlOfAuth as getUploadActionUrlOfAuth + , getTaskUrlById as getTaskUrlById, TEST_HOST ,htmlEncode as htmlEncode ,getupload_git_file as getupload_git_file} from './UrlTool'; export {setmiyah as setmiyah} from './Component'; export { default as queryString } from './UrlTool2'; export { SnackbarHOC as SnackbarHOC } from './SnackbarHOC'; export { trigger as trigger, on as on, off as off - , broadcastChannelPostMessage, broadcastChannelOnmessage } from './EventUtil'; + , broadcastChannelPostMessage, broadcastChannelOnmessage } from './EventUtil'; export { updatePageParams as updatePageParams } from './RouterUtil'; export { bytesToSize as bytesToSize } from './UnitUtil'; export { markdownToHTML, uploadNameSizeSeperator, appendFileSizeToUploadFile, appendFileSizeToUploadFileAll, isImageExtension, - downloadFile, sortDirections } from './TextUtil' + downloadFile, sortDirections } from './TextUtil' export { handleDateString, getNextHalfHourOfMoment,formatDuring } from './DateUtil' export { configShareForIndex, configShareForPaths, configShareForShixuns, configShareForCourses, configShareForCustom } from './util/ShareUtil' @@ -30,7 +30,7 @@ export { toStore as toStore, fromStore as fromStore } from './Store' export { trace_collapse, trace, debug, info, warn, error, trace_c, debug_c, info_c, warn_c, error_c } from './LogUtil' export { EDU_ADMIN, EDU_BUSINESS, EDU_SHIXUN_MANAGER, EDU_SHIXUN_MEMBER, EDU_CERTIFICATION_TEACHER - , EDU_GAME_MANAGER, EDU_TEACHER, EDU_NORMAL} from './Const' + , EDU_GAME_MANAGER, EDU_TEACHER, EDU_NORMAL} from './Const' export { default as AttachmentList } from './components/attachment/AttachmentList' diff --git a/public/react/src/modules/courses/boards/TopicDetail.js b/public/react/src/modules/courses/boards/TopicDetail.js index e8767fb87..f4df177c7 100644 --- a/public/react/src/modules/courses/boards/TopicDetail.js +++ b/public/react/src/modules/courses/boards/TopicDetail.js @@ -682,6 +682,7 @@ class TopicDetail extends Component { {!isCourseEnd && } {/* onClick={ this.createNewComment } diff --git a/public/react/src/modules/courses/common/comments/CommonReply.js b/public/react/src/modules/courses/common/comments/CommonReply.js index 42ec3d65a..50f2b60cb 100644 --- a/public/react/src/modules/courses/common/comments/CommonReply.js +++ b/public/react/src/modules/courses/common/comments/CommonReply.js @@ -252,6 +252,7 @@ class CommonReply extends Component{ {/* bor-bottom-greyE */} diff --git a/public/react/src/modules/courses/graduation/tasks/GraduationTaskssettingReply.js b/public/react/src/modules/courses/graduation/tasks/GraduationTaskssettingReply.js index 4281d0ec6..ce0554488 100644 --- a/public/react/src/modules/courses/graduation/tasks/GraduationTaskssettingReply.js +++ b/public/react/src/modules/courses/graduation/tasks/GraduationTaskssettingReply.js @@ -18,7 +18,7 @@ import { generateComments, generateChildComments, _findById, handleContentBefore const REPLY_PAGE_COUNT = 10 const $ = window.$; -/* +/* 相比较GraduateTopicReply 改动的地方 列表接口名 /graduation_tasks/${graduation_topic_id}/show_comment.json?parent_id=${parent.id}&limit=500 回复类型名 jour_type: 'GraduationTask', @@ -34,7 +34,7 @@ class GraduationTaskssettingReply extends Component{ componentDidMount(){ this.fetchReplies() - + } _getUser() { const { current_user } = this.props; @@ -58,7 +58,7 @@ class GraduationTaskssettingReply extends Component{ // m_parent_id reply_id: memo.user_id } - } + } ).then((response) => { if (response.data.status === -1) { console.error('服务端异常') @@ -66,18 +66,18 @@ class GraduationTaskssettingReply extends Component{ } // this.props.showNotification('帖子发表成功') - if (response.data && response.data.id) { + if (response.data && response.data.id) { const _id = response.data.id; // md editor.setValue && editor.setValue('') - + const user = this._getUser(); this.setState({ comments: addNewComment(this.state.comments, _id, content, user, this.props.isSuperAdmin(), this), total_count: this.state.total_count + 1 }) this.refs.editor.showEditor(); - + } }).catch((error) => { console.log(error) @@ -95,13 +95,13 @@ class GraduationTaskssettingReply extends Component{ return; } const url = `/users/reply_message.json`; - + const { comments } = this.state; const user = this._getUser(); const graduation_topic_id = this.props.memo.id const commentIndex = this._findById(id, comments); let comment = comments[commentIndex]; - + commentContent = handleContentBeforeCreateSecondLevelComment(commentContent) axios.post(url, { journals_for_message: { @@ -113,9 +113,9 @@ class GraduationTaskssettingReply extends Component{ } }, { - } + } ).then((response) => { - if (response.data.id) { + if (response.data.id) { let newId = response.data.id; this.setState({ @@ -128,7 +128,7 @@ class GraduationTaskssettingReply extends Component{ memo: newMemo2 }) } - + }).catch((error) => { console.log(error) }) @@ -142,7 +142,7 @@ class GraduationTaskssettingReply extends Component{ }) .then((response) => { const { comments } = response.data - + // const memo = Object.assign({}, this.state.memo) // memo.sum_replies_count = sum_replies_count; @@ -160,7 +160,7 @@ class GraduationTaskssettingReply extends Component{ this.fetchReplies() }) } - + fetchReplies = () => { const graduation_topic_id = this.props.memo.id const course_id = this.props.course_id @@ -170,7 +170,7 @@ class GraduationTaskssettingReply extends Component{ }) .then((response) => { const { comments, messages_count } = response.data - + this.setState({ comments: generateComments(comments, this.transformReply), // : this.state.comments.concat(comments), @@ -180,7 +180,7 @@ class GraduationTaskssettingReply extends Component{ console.log(error) }) } - + transformReply = (reply, children = []) => { const isAdmin = this.props.isAdmin() const isSuperAdmin = this.props.isSuperAdmin() @@ -189,7 +189,7 @@ class GraduationTaskssettingReply extends Component{ isSuperAdmin: isSuperAdmin, permission: true, // children: children, - hidden: reply.hidden, + hidden: reply.hidden, id: reply.id, image_url: reply.author.image_url, reward: null, // @@ -235,7 +235,7 @@ class GraduationTaskssettingReply extends Component{ -
- - - {/* { true ? : + + + {/* { true ? :
写评论
} */}
- - { total_count > REPLY_PAGE_COUNT && + + { total_count > REPLY_PAGE_COUNT &&
写评论
diff --git a/public/react/src/modules/courses/graduation/topics/GraduateTopicReply.js b/public/react/src/modules/courses/graduation/topics/GraduateTopicReply.js index df6152c04..f08938b4e 100644 --- a/public/react/src/modules/courses/graduation/topics/GraduateTopicReply.js +++ b/public/react/src/modules/courses/graduation/topics/GraduateTopicReply.js @@ -226,7 +226,7 @@ class GraduateTopicReply extends Component{ return( -
{ window.__useKindEditor === true ? - + : - + } {/* onClick={ this.createNewComment } */}