From fb076159a995572e1e5982c469b23456d0ee98b5 Mon Sep 17 00:00:00 2001 From: hjm <63528605@qq.com> Date: Sat, 20 Jul 2019 18:12:51 +0800 Subject: [PATCH] reset_my_game --- public/react/src/modules/tpm/TPMBanner.js | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/public/react/src/modules/tpm/TPMBanner.js b/public/react/src/modules/tpm/TPMBanner.js index 68113f133..866ca3583 100644 --- a/public/react/src/modules/tpm/TPMBanner.js +++ b/public/react/src/modules/tpm/TPMBanner.js @@ -349,6 +349,7 @@ class TPMBanner extends Component { // }); // } + // reset_my_game hidestartshixunsreplace=(url)=>{ this.setState({ isSpin:true, @@ -358,7 +359,7 @@ class TPMBanner extends Component { // let path="/shixuns/"+response.data.shixun_identifier+"/challenges"; // this.props.history.push(path); message.success('重置成功,正在进入实训!'); - this.startshixunCombat(response.data.shixun_identifier); + this.startshixunCombat(response.data.shixun_identifier, 1); this.setState({ shixunsreplace:false, isSpin:false, @@ -379,7 +380,7 @@ class TPMBanner extends Component { //开始实战按钮 - startshixunCombat=(id)=>{ + startshixunCombat=(id, reset)=>{ let {shixunsDetails} = this.props if( shixunsDetails.shixun_status>1){ this.setState({ @@ -393,7 +394,10 @@ class TPMBanner extends Component { } - let url="/shixuns/"+id+"/shixun_exec.json"; + let url="/shixuns/"+id+"/shixun_exec.json" ; + if (reset) { + url += '?reset=' + reset + } axios.get(url).then((response) => { if(response.status===200){ if(response.data.status===-2){