diff --git a/public/react/src/modules/tpm/TPMBanner.js b/public/react/src/modules/tpm/TPMBanner.js index 78feed436..14ddcc579 100644 --- a/public/react/src/modules/tpm/TPMBanner.js +++ b/public/react/src/modules/tpm/TPMBanner.js @@ -328,8 +328,8 @@ class TPMBanner extends Component { }) axios.get(url).then((response) => { if(response.status===200){ - let path="/shixuns/"+response.data.shixun_identifier+"/challenges"; - this.props.history.push(path); + // let path="/shixuns/"+response.data.shixun_identifier+"/challenges"; + // this.props.history.push(path); this.setState({ shixunsreplace:false, isSpin:false, @@ -346,6 +346,32 @@ class TPMBanner extends Component { }); } + + + shixunexec=(url)=>{ + this.setState({ + isSpin:true, + }) + axios.get(url).then((response) => { + if(response.status===200){ + // let path="/shixuns/"+response.data.shixun_identifier+"/challenges"; + // this.props.history.push(path); + this.setState({ + shixunsreplace:false, + isSpin:false, + }) + message.success('重置成功,正在进入实训!'); + this.startshixunCombat(); + }} + ).catch((error) => { + this.setState({ + startbtn:false, + shixunsreplace:false, + isSpin:false + }) + }); + + } //开始实战按钮 startshixunCombat=()=>{ let {shixunsDetails} = this.props