From d18f1dad2f1b7189ee849d4e94ceb68d8ff6ff53 Mon Sep 17 00:00:00 2001
From: dinglink <837816638@qq.com>
Date: Thu, 26 Mar 2020 00:25:12 +0800
Subject: [PATCH] =?UTF-8?q?=E6=97=B6=E9=97=B4=E4=B8=8D=E4=BC=A0=E9=80=92?=
=?UTF-8?q?=E7=9A=84=E9=97=AE=E9=A2=98?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
public/react/src/context/TPIContextProvider.js | 6 +++---
public/react/src/modules/courses/Video/Video.js | 3 ++-
2 files changed, 5 insertions(+), 4 deletions(-)
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 &&