reset_my_game

dev_forum
hjm 5 years ago
parent 49de0206bd
commit fb076159a9

@ -349,6 +349,7 @@ class TPMBanner extends Component {
// }); // });
// } // }
// reset_my_game
hidestartshixunsreplace=(url)=>{ hidestartshixunsreplace=(url)=>{
this.setState({ this.setState({
isSpin:true, isSpin:true,
@ -358,7 +359,7 @@ class TPMBanner extends Component {
// let path="/shixuns/"+response.data.shixun_identifier+"/challenges"; // let path="/shixuns/"+response.data.shixun_identifier+"/challenges";
// this.props.history.push(path); // this.props.history.push(path);
message.success('重置成功,正在进入实训!'); message.success('重置成功,正在进入实训!');
this.startshixunCombat(response.data.shixun_identifier); this.startshixunCombat(response.data.shixun_identifier, 1);
this.setState({ this.setState({
shixunsreplace:false, shixunsreplace:false,
isSpin:false, isSpin:false,
@ -379,7 +380,7 @@ class TPMBanner extends Component {
//开始实战按钮 //开始实战按钮
startshixunCombat=(id)=>{ startshixunCombat=(id, reset)=>{
let {shixunsDetails} = this.props let {shixunsDetails} = this.props
if( shixunsDetails.shixun_status>1){ if( shixunsDetails.shixun_status>1){
this.setState({ 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) => { axios.get(url).then((response) => {
if(response.status===200){ if(response.status===200){
if(response.data.status===-2){ if(response.data.status===-2){

Loading…
Cancel
Save