From 540364e11ac1db00fab4fb62f459489d57bf04a9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=9E=97?= <904079904@qq.com> Date: Sat, 26 Oct 2019 14:00:49 +0800 Subject: [PATCH] =?UTF-8?q?=E9=97=AE=E5=8D=B7=E9=81=97=E7=95=99=E7=9A=84?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../modules/courses/poll/PollDetailTabThirdInfo.js | 6 +++++- public/react/src/modules/courses/poll/PollNew.js | 13 +++++++++---- 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/public/react/src/modules/courses/poll/PollDetailTabThirdInfo.js b/public/react/src/modules/courses/poll/PollDetailTabThirdInfo.js index dfe8ad4e7..23023409c 100644 --- a/public/react/src/modules/courses/poll/PollDetailTabThirdInfo.js +++ b/public/react/src/modules/courses/poll/PollDetailTabThirdInfo.js @@ -59,7 +59,11 @@ class PollDetailTabThirdInfo extends Component{ :"" }

-
  • {item.question.question_title}
  • +

    {item.question.question_title}

    { // 单选题 item.question.question_type==1 && diff --git a/public/react/src/modules/courses/poll/PollNew.js b/public/react/src/modules/courses/poll/PollNew.js index 10a9b00c7..7251f05a8 100644 --- a/public/react/src/modules/courses/poll/PollNew.js +++ b/public/react/src/modules/courses/poll/PollNew.js @@ -616,11 +616,16 @@ class PollNew extends Component { // let name="Anchor_"+index; console.log("scrollToAnchor"); console.log(index); - if (index) { - let anchorElement = document.getElementById(index); - // if(anchorElement) { anchorElement.scrollIntoView(); } - $("html").animate({ scrollTop: $(anchorElement).offset().top - 150}) + try { + if (index) { + let anchorElement = document.getElementById(index); + // if(anchorElement) { anchorElement.scrollIntoView(); } + $("html").animate({scrollTop: $(anchorElement).offset().top - 150}) + } + } catch (e) { + } + } //新增添加题目 有new addMytopic = (index, pollid, Insertposition, Whether, id,inty) => {