From 66dea92f25754de52901a0950a1cc32f130ffacd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=9E=97?= <904079904@qq.com> Date: Wed, 26 Jun 2019 23:09:53 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../react/src/modules/courses/poll/PollNew.js | 12 +++--- .../TraineetraininginformationModal.js | 43 +++++++++---------- 2 files changed, 27 insertions(+), 28 deletions(-) diff --git a/public/react/src/modules/courses/poll/PollNew.js b/public/react/src/modules/courses/poll/PollNew.js index 3f7a4a7b6..fa2ed08b4 100644 --- a/public/react/src/modules/courses/poll/PollNew.js +++ b/public/react/src/modules/courses/poll/PollNew.js @@ -779,13 +779,13 @@ class PollNew extends Component { } } - if (maxtie < 2) { + if (maxtie < 3) { if (object.question.question_type === 1) { - this.props.showNotification(`选项不能少于2个!`); + this.props.showNotification(`选项不能少于3个!`); return } else if (object.question.question_type === 2) { - this.props.showNotification(`选项不能少于2个!`); + this.props.showNotification(`选项不能少于3个!`); return } @@ -1259,12 +1259,12 @@ class PollNew extends Component { } } - if (maxtie < 2) { + if (maxtie < 3) { if (object.question.question_type === 1) { - this.props.showNotification('选项不能少于2个!'); + this.props.showNotification('选项不能少于3个!'); return } else if (object.question.question_type === 2) { - this.props.showNotification('选项不能少于2个!'); + this.props.showNotification('选项不能少于3个!'); return } diff --git a/public/react/src/modules/courses/shixunHomework/TraineetraininginformationModal.js b/public/react/src/modules/courses/shixunHomework/TraineetraininginformationModal.js index 7d34eb9a1..10db61e1b 100644 --- a/public/react/src/modules/courses/shixunHomework/TraineetraininginformationModal.js +++ b/public/react/src/modules/courses/shixunHomework/TraineetraininginformationModal.js @@ -36,7 +36,6 @@ class TraineetraininginformationModal extends Component { props: this.props, userids: this.props.userids, game_list:this.props.game_list, - boolgalist:this.props.boolgalist, experience:this.props.experience, }) @@ -52,26 +51,26 @@ class TraineetraininginformationModal extends Component { // this.seacthdata(); } - componentWillReceiveProps(nextProps) { - // console.log("46"); - // console.log(nextProps); - // console.log(this.props); - if (nextProps.boolgalist != this.props.boolgalist) { - // console.log("50"); - // console.log(nextProps.user); - if (nextProps.boolgalist !== undefined) { - // console.log("53"); - // console.log(nextProps.user); - this.setState({ - boolgalist: nextProps.boolgalist, - }) - } - - - } - - - } + // componentWillReceiveProps(nextProps) { + // // console.log("46"); + // // console.log(nextProps); + // // console.log(this.props); + // if (nextProps.boolgalist != this.props.boolgalist) { + // // console.log("50"); + // // console.log(nextProps.user); + // if (nextProps.boolgalist !== undefined) { + // // console.log("53"); + // // console.log(nextProps.user); + // this.setState({ + // boolgalist: nextProps.boolgalist, + // }) + // } + // + // + // } + // + // + // } LimitNumber=(txt)=> { var str = txt; if(str.length>25){ @@ -81,7 +80,7 @@ class TraineetraininginformationModal extends Component { } render() { var columns; - if(this.state.boolgalist&&this.state.boolgalist === true) { + if(this.props.boolgalist&&this.props.boolgalist === true) { columns = [ { title: '关卡',