|
|
|
@ -107,7 +107,7 @@ class Challengesjupyter extends Component {
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
gettimeinfo_with_tpm=(datas)=>{
|
|
|
|
|
gettimeinfo_with_tpm=(datas,type)=>{
|
|
|
|
|
let timeinfo_with_tpm=`/jupyters/timeinfo_with_tpm.json`
|
|
|
|
|
axios.get(timeinfo_with_tpm, {params: datas}).then((response) => {
|
|
|
|
|
if (response.data.status === 403||response.data.status === 401||response.data.status === 500) {
|
|
|
|
@ -128,6 +128,9 @@ class Challengesjupyter extends Component {
|
|
|
|
|
endtimes:endsms===0?Date.now()+1000:Date.now() +endsms
|
|
|
|
|
})
|
|
|
|
|
},500);
|
|
|
|
|
if(type===true){
|
|
|
|
|
this.props.showNotification('延长成功!');
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}else{
|
|
|
|
|
|
|
|
|
@ -461,19 +464,21 @@ class Challengesjupyter extends Component {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
onendhandleClickResetTpi=(id)=>{
|
|
|
|
|
|
|
|
|
|
let datas={
|
|
|
|
|
identifier:id,
|
|
|
|
|
}
|
|
|
|
|
const url = `/jupyters/active_with_tpm.json`;
|
|
|
|
|
axios.get(url,{params:{
|
|
|
|
|
identifier:id
|
|
|
|
|
}}).then((response) => {
|
|
|
|
|
if(response.data.status===0){
|
|
|
|
|
this.props.showNotification('延长成功!');
|
|
|
|
|
setTimeout(()=>{
|
|
|
|
|
this.setState({
|
|
|
|
|
jupytertime:Date.now() + 900 * 1000,
|
|
|
|
|
endtimes:Date.now() + 300 * 1000
|
|
|
|
|
})
|
|
|
|
|
},500);
|
|
|
|
|
this.gettimeinfo_with_tpm(datas,true)
|
|
|
|
|
// setTimeout(()=>{
|
|
|
|
|
// this.setState({
|
|
|
|
|
// jupytertime:Date.now() + 900 * 1000,
|
|
|
|
|
// endtimes:Date.now() + 300 * 1000
|
|
|
|
|
// })
|
|
|
|
|
// },500);
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
@ -550,7 +555,7 @@ class Challengesjupyter extends Component {
|
|
|
|
|
<span className={"Countdowntypes"}>
|
|
|
|
|
{/*this.state.jupytertime*/}
|
|
|
|
|
<Countdown value={this.state.jupytertime} format="HH:mm:ss" onFinish={this.onFinish}/>
|
|
|
|
|
{/*{endtimes===false?"":<Countdown value={endtimes} format="HH:mm:ss" onFinish={this.onendFinish}/>}*/}
|
|
|
|
|
{endtimes===false?"":<Countdown value={endtimes} format="HH:mm:ss" onFinish={this.onendFinish}/>}
|
|
|
|
|
</span>
|
|
|
|
|
|
|
|
|
|
<p className="clearfix mb20 edu-back-white">
|
|
|
|
|