From 6db157fe7febd935ee5b7c04eb4e6f8067368fcf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=9E=97?= <904079904@qq.com> Date: Sun, 1 Sep 2019 21:24:04 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=86=E7=BB=84=E4=BD=9C=E4=B8=9A=E9=A2=98?= =?UTF-8?q?=E5=BA=93=E5=8F=91=E9=80=81=E5=92=8C=E5=88=A0=E9=99=A4=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../react/src/modules/courses/poll/PollNewQuestbank.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/public/react/src/modules/courses/poll/PollNewQuestbank.js b/public/react/src/modules/courses/poll/PollNewQuestbank.js index a1082a21c..eda45c990 100644 --- a/public/react/src/modules/courses/poll/PollNewQuestbank.js +++ b/public/react/src/modules/courses/poll/PollNewQuestbank.js @@ -2287,6 +2287,15 @@ class PollNewQuestbank extends Component { //提交题目//没有就创建新的题库,新建问newz题和保存题目不一样不能同时保存 这里只是新建 和编辑 标题和须知 submitQuestionnaire = () => { + if (this.state.polls_nametest === undefined || this.state.polls_nametest === "") { + this.props.showNotification("请输入标题"); + return + } + if(this.state.poll_questions&&this.state.poll_questions.length===0){ + this.props.showNotification("至少创建1个题目"); + return; + } + this.props.history.push(`/banks/poll/${this.props.match.params.workid}`); // this.props.initPublic(undefined); // console.log("调用了submitQuestionnaire")