|
|
|
@ -113,16 +113,16 @@ class Challengesjupyter extends Component {
|
|
|
|
|
|
|
|
|
|
}else{
|
|
|
|
|
if(response.data.status===0){
|
|
|
|
|
if(response.data.useSeconds===null){
|
|
|
|
|
if(response.data.remainingSeconds===null){
|
|
|
|
|
this.handleClickResetTpi()
|
|
|
|
|
}else{
|
|
|
|
|
let useSeconds=response.data.useSeconds;
|
|
|
|
|
let summain=3600 * 1000;
|
|
|
|
|
let sums= useSeconds * 1000;
|
|
|
|
|
let sum=summain-sums;
|
|
|
|
|
let remainingSeconds=response.data.remainingSeconds;
|
|
|
|
|
// let summain=3600 * 1000;
|
|
|
|
|
let sums= remainingSeconds * 1000;
|
|
|
|
|
// let sum=summain-sums;
|
|
|
|
|
setTimeout(()=>{
|
|
|
|
|
this.setState({
|
|
|
|
|
jupytertime:Date.now() +sum
|
|
|
|
|
jupytertime:Date.now() +sums
|
|
|
|
|
})
|
|
|
|
|
},500);
|
|
|
|
|
}
|
|
|
|
@ -420,6 +420,7 @@ class Challengesjupyter extends Component {
|
|
|
|
|
|
|
|
|
|
onFinish=()=>{
|
|
|
|
|
let id=this.props.match.params.shixunId;
|
|
|
|
|
let that=this;
|
|
|
|
|
Modal.confirm({
|
|
|
|
|
title: '倒计时截止',
|
|
|
|
|
content: (
|
|
|
|
@ -430,7 +431,7 @@ class Challengesjupyter extends Component {
|
|
|
|
|
okText: '确定',
|
|
|
|
|
cancelText: '取消',
|
|
|
|
|
onOk () {
|
|
|
|
|
this.handleClickResetTpisync_code(id)
|
|
|
|
|
that.handleClickResetTpisync_code(id)
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|