diff --git a/public/react/src/App.js b/public/react/src/App.js index 1a1af02d9..15105f749 100644 --- a/public/react/src/App.js +++ b/public/react/src/App.js @@ -207,6 +207,12 @@ const UsersInfo = Loadable({ loading: Loading, }) +// 兴趣页面 +const Interestpage = Loadable({ + loader: () => import('./modules/user/Interestpage'), + loading: Loading, +}) + class App extends Component { constructor(props) { super(props) @@ -324,8 +330,8 @@ class App extends Component { */} {/* */} - - + {/* 兴趣页面*/} + {/**/} diff --git a/public/react/src/modules/courses/poll/PollNew.js b/public/react/src/modules/courses/poll/PollNew.js index 060b8b482..be6b7e5eb 100644 --- a/public/react/src/modules/courses/poll/PollNew.js +++ b/public/react/src/modules/courses/poll/PollNew.js @@ -95,6 +95,12 @@ class PollNew extends Component { // 初始化数据 componentDidMount = () => { // console.log("componentDidMount 50") + if( this.props.isStudent() === true){ + + this.props.history.push("/403") + + return + } if (this.props.match.params.news !== undefined) { if (this.props.match.params.news === "new") { this.state.Newedit === true; @@ -780,19 +786,21 @@ class PollNew extends Component { } } - if (maxtie < 3) { - if (object.question.question_type === 1) { - this.props.showNotification(`选项不能少于3个!`); + if (object.question.question_type === 1) { + if (maxtie < 2) { + this.props.showNotification(`选项不能少于2个!`); return + } } else if (object.question.question_type === 2) { + if (maxtie < 3) { this.props.showNotification(`选项不能少于3个!`); - return + } } - } + if (object.question.question_type === 2) { if (object.question.max_choices > 0) { @@ -1260,17 +1268,19 @@ class PollNew extends Component { } } - if (maxtie < 3) { if (object.question.question_type === 1) { - this.props.showNotification('选项不能少于3个!'); + if (maxtie < 2) { + this.props.showNotification('选项不能少于2个!'); return + } } else if (object.question.question_type === 2) { + if (maxtie < 3) { this.props.showNotification('选项不能少于3个!'); return + } } - } if (object.question.question_type === 2) { if (object.question.max_choices > 0) { @@ -2496,7 +2506,7 @@ class PollNew extends Component { ( {item.question.answers === undefined ? "" : item.question.answers.map((items, i) => { return ( -
+
{/*
{items.answer_text}
*/} @@ -2511,7 +2521,7 @@ class PollNew extends Component { ( {item.question.answers === undefined ? "" : item.question.answers.map((items, i) => { return ( -
+
{items.answer_text} diff --git a/public/react/src/modules/courses/shixunHomework/Homeworddescription.js b/public/react/src/modules/courses/shixunHomework/Homeworddescription.js index 405490f38..472d76d2c 100644 --- a/public/react/src/modules/courses/shixunHomework/Homeworddescription.js +++ b/public/react/src/modules/courses/shixunHomework/Homeworddescription.js @@ -41,7 +41,7 @@ class Homeworddescription extends Component { super(props); this.state = { props: props, - description:undefined, + description:props.description, } @@ -74,10 +74,8 @@ class Homeworddescription extends Component {
{/*