From 4b130f2724780815352c10b13596e88d4ebdc4d9 Mon Sep 17 00:00:00 2001 From: hjm <63528605@qq.com> Date: Thu, 25 Jul 2019 15:48:46 +0800 Subject: [PATCH] =?UTF-8?q?=E9=9D=A2=E5=8C=85=E5=B1=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/modules/courses/poll/PollDetailIndex.js | 4 ++-- .../react/src/modules/courses/poll/PollInfo.js | 3 ++- .../react/src/modules/courses/poll/PollNew.js | 17 +++++++++++------ 3 files changed, 15 insertions(+), 9 deletions(-) diff --git a/public/react/src/modules/courses/poll/PollDetailIndex.js b/public/react/src/modules/courses/poll/PollDetailIndex.js index 8e3f78d5c..9119b7902 100644 --- a/public/react/src/modules/courses/poll/PollDetailIndex.js +++ b/public/react/src/modules/courses/poll/PollDetailIndex.js @@ -110,7 +110,7 @@ class PollDetailIndex extends Component{ } render(){ let {tab,pollDetail,user_permission}=this.state; - + const { current_user } = this.props; const isAdmin =this.props.isAdmin(); const isStudent = this.props.isStudent(); return( @@ -123,7 +123,7 @@ class PollDetailIndex extends Component{ />

- {this.props.coursedata.name} + {this.props.coursedata.name} > 问卷 > diff --git a/public/react/src/modules/courses/poll/PollInfo.js b/public/react/src/modules/courses/poll/PollInfo.js index fc1d55385..f32d652c2 100644 --- a/public/react/src/modules/courses/poll/PollInfo.js +++ b/public/react/src/modules/courses/poll/PollInfo.js @@ -299,6 +299,7 @@ class PollInfo extends Component{ modalSave, questionPanelFixed }=this.state; + const { current_user } = this.props let isAdmin=this.props.isAdmin(); let isStudent=this.props.isStudent(); return( @@ -314,7 +315,7 @@ class PollInfo extends Component{ >

- {courseName} + {courseName} > 问卷 > diff --git a/public/react/src/modules/courses/poll/PollNew.js b/public/react/src/modules/courses/poll/PollNew.js index 0c4109ceb..cd559b75f 100644 --- a/public/react/src/modules/courses/poll/PollNew.js +++ b/public/react/src/modules/courses/poll/PollNew.js @@ -2320,12 +2320,17 @@ class PollNew extends Component { } gotohome=()=>{ - let courseId=this.props.match.params.coursesId; - if(courseId===undefined){ - this.props.history.push("/courses"); - }else{ - this.props.history.push(this.props.current_user.first_category_url); - } + const { current_user} = this.props + + this.props.history.push(current_user.first_category_url); + + + // let courseId=this.props.match.params.coursesId; + // if(courseId===undefined){ + // this.props.history.push("/courses"); + // }else{ + // this.props.history.push(this.props.current_user.first_category_url); + // } } //试图 render() {