diff --git a/public/react/src/AppConfig.js b/public/react/src/AppConfig.js index 37bd57e0b..d80795df9 100644 --- a/public/react/src/AppConfig.js +++ b/public/react/src/AppConfig.js @@ -24,6 +24,7 @@ function locationurl(list){ } + // TODO 开发期多个身份切换 let debugType ="" if (isDev) { @@ -44,30 +45,6 @@ if (isDev) { //debugType="student"; - - -function Return_Reload() { - - var isPageHide = false; - - window.addEventListener('pageshow', function () { - if (isPageHide) { - - window.location.reload(); - - } - - }); - - window.addEventListener('pagehide', function () { - isPageHide = true; - - }); - -} -Return_Reload(); - - function railsgettimes(proxy) { if(timestamp&&checkSubmitFlg===false){ $.ajax({url:proxy,async:false,success:function(data){ diff --git a/public/react/src/modules/courses/poll/PollDetailTabForth.js b/public/react/src/modules/courses/poll/PollDetailTabForth.js index 485cdc07c..dbf63451b 100644 --- a/public/react/src/modules/courses/poll/PollDetailTabForth.js +++ b/public/react/src/modules/courses/poll/PollDetailTabForth.js @@ -116,7 +116,7 @@ class PollDetailTabForth extends Component{ let url=`/polls/${pollId}/poll_setting.json`; axios.get(url).then((result)=>{ if(result){ - this.props.getPollInfo(); + this.setState({ polls:result.data.poll, unitSetting:result.data.poll.unified_setting, @@ -183,6 +183,8 @@ class PollDetailTabForth extends Component{ }) } } + + this.props.getPollInfo(); }).catch((error)=>{ console.log(error); })