From a2f621701441be69a22d57ff7b0411ddac763cf4 Mon Sep 17 00:00:00 2001 From: ysl <904079904@qq.com> Date: Sat, 22 Jun 2019 19:03:31 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/react/src/modules/tpm/TPMBanner.js | 30 +++++++++++++++++++++-- 1 file changed, 28 insertions(+), 2 deletions(-) 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