From b6e36fd02ef40f0b609fbefa361e325a8bb45e53 Mon Sep 17 00:00:00 2001 From: caishi <1149225589@qq.com> Date: Sat, 22 Jun 2019 15:05:31 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=AA=E4=BA=BA=E4=B8=BB=E9=A1=B5=EF=BC=9Afi?= =?UTF-8?q?x=20bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../exercise/ExerciseReviewAndAnswer.js | 28 +++++++++++++----- public/react/src/modules/courses/poll/Poll.js | 1 + .../courses/poll/PollDetailTabFirst.js | 7 ++++- .../react/src/modules/user/usersInfo/Infos.js | 29 ++++++++++++------- 4 files changed, 47 insertions(+), 18 deletions(-) diff --git a/public/react/src/modules/courses/exercise/ExerciseReviewAndAnswer.js b/public/react/src/modules/courses/exercise/ExerciseReviewAndAnswer.js index 0893a5e23..ce9c00a21 100644 --- a/public/react/src/modules/courses/exercise/ExerciseReviewAndAnswer.js +++ b/public/react/src/modules/courses/exercise/ExerciseReviewAndAnswer.js @@ -240,11 +240,15 @@ class ExerciseReviewAndAnswer extends Component{ ) } // 调分 - showSetScore=(key,flag)=>{ + showSetScore=(key,flag,setId)=>{ this.setState( (prevState) => ({ exercise_questions : update(prevState.exercise_questions, {[key]: { setScore: {$set: flag == undefined || flag==false ? true : false}}}) - }) + }),()=>{ + if (setId && (flag == undefined || flag==false)) { + $("html").animate({ scrollTop: $("#Anchor_"+setId).offset().top - 150 }) + } + } ) this.setState({ score:undefined @@ -502,6 +506,18 @@ class ExerciseReviewAndAnswer extends Component{ console.log(data&&data.exercise.user_name) return(