diff --git a/public/react/src/context/TPIContextProvider.js b/public/react/src/context/TPIContextProvider.js index 291626038..ab9447fee 100644 --- a/public/react/src/context/TPIContextProvider.js +++ b/public/react/src/context/TPIContextProvider.js @@ -133,11 +133,9 @@ class TPIContextProvider extends Component { }) } - componentWillMount () { - // 拦截判断是否离开当前页面 - } componentWillUnmount() { + this.costTimeInterval && window.clearInterval(this.costTimeInterval) } componentDidMount() { @@ -195,6 +193,8 @@ class TPIContextProvider extends Component { if (window.location.port == 3007) { testPath = 'http://test-newweb.educoder.net' } + + // var url = `${testPath}/api/v1/games/${ game.identifier }/cost_time` var url = `${testPath}/api/tasks/${ game.identifier }/cost_time${getRandomNumber()}` window.$.ajax({ diff --git a/public/react/src/modules/courses/Video/Video.js b/public/react/src/modules/courses/Video/Video.js index 856eb5a9c..7d40e099f 100644 --- a/public/react/src/modules/courses/Video/Video.js +++ b/public/react/src/modules/courses/Video/Video.js @@ -235,7 +235,8 @@ class Video extends Component { className="showVideoModal" width={800 - 1} > - {videoId && } + {this.state.videourl===null?'':videoId &&} + {/* {videoId && } */} {this.props.isAdmin()===false?'':