|
|
|
@ -1,6 +1,6 @@
|
|
|
|
|
import React,{ Component } from "react";
|
|
|
|
|
import CoursesListType from '../coursesPublic/CoursesListType';
|
|
|
|
|
import { WordsBtn } from 'educoder';
|
|
|
|
|
import { WordsBtn, getTaskUrlById } from 'educoder';
|
|
|
|
|
import {Tooltip,message,Modal} from 'antd';
|
|
|
|
|
import {Link} from 'react-router-dom';
|
|
|
|
|
import axios from 'axios';
|
|
|
|
@ -56,7 +56,7 @@ class ShixunhomeWorkItem extends Component{
|
|
|
|
|
startbtn:true,
|
|
|
|
|
})
|
|
|
|
|
let url= list+".json";
|
|
|
|
|
const w=window.open('about:blank');
|
|
|
|
|
// const w=window.open('about:blank');
|
|
|
|
|
axios.get(url).then((response) => {
|
|
|
|
|
|
|
|
|
|
if(response.status===200){
|
|
|
|
@ -66,7 +66,7 @@ class ShixunhomeWorkItem extends Component{
|
|
|
|
|
shixunsreplace:true,
|
|
|
|
|
hidestartshixunsreplacevalue:response.data.message+".json"
|
|
|
|
|
})
|
|
|
|
|
w.close()
|
|
|
|
|
// w.close()
|
|
|
|
|
}else if(response.data.status===-1){
|
|
|
|
|
console.log(response)
|
|
|
|
|
}else if(response.data.status===-3){
|
|
|
|
@ -75,11 +75,15 @@ class ShixunhomeWorkItem extends Component{
|
|
|
|
|
startshixunCombattype:true,
|
|
|
|
|
startbtn:false
|
|
|
|
|
})
|
|
|
|
|
w.close()
|
|
|
|
|
// w.close()
|
|
|
|
|
}else{
|
|
|
|
|
if(response.data.status!=401&&response.data.status!=403){
|
|
|
|
|
w.location.href= "/tasks/"+response.data.game_identifier
|
|
|
|
|
}
|
|
|
|
|
this.setState({
|
|
|
|
|
startbtn:false
|
|
|
|
|
})
|
|
|
|
|
// if(response.data.status!=401&&response.data.status!=403){
|
|
|
|
|
// w.location.href= "/tasks/"+response.data.game_identifier
|
|
|
|
|
// }
|
|
|
|
|
window.location.href = "/tasks/"+response.data.game_identifier
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
@ -87,7 +91,7 @@ class ShixunhomeWorkItem extends Component{
|
|
|
|
|
this.setState({
|
|
|
|
|
startbtn:false
|
|
|
|
|
})
|
|
|
|
|
w.close()
|
|
|
|
|
// w.close()
|
|
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
@ -389,9 +393,15 @@ class ShixunhomeWorkItem extends Component{
|
|
|
|
|
|
|
|
|
|
{this.props.isStudent===true?this.props.course_identity===5?
|
|
|
|
|
<WordsBtn style="blue" className="colorblue font-16 mr20 fr mt10">
|
|
|
|
|
{startbtn===false?<a className="btn colorblue" onClick={()=>this.taskoperationId(discussMessage.task_operation[1])}>
|
|
|
|
|
{discussMessage.task_operation[0]}
|
|
|
|
|
</a>:<a className="btn colorblue" >开启中</a>}
|
|
|
|
|
{startbtn===false?
|
|
|
|
|
(discussMessage.task_operation[0] == '继续挑战' || discussMessage.task_operation[0] == '查看实战' ?
|
|
|
|
|
<a className="btn colorblue" href={getTaskUrlById(discussMessage.task_operation[1])}>
|
|
|
|
|
{discussMessage.task_operation[0]}
|
|
|
|
|
</a>
|
|
|
|
|
:
|
|
|
|
|
<a className="btn colorblue" onClick={()=>this.taskoperationId(discussMessage.task_operation[1])}>
|
|
|
|
|
{discussMessage.task_operation[0]}
|
|
|
|
|
</a>):<a className="btn colorblue" >开启中</a>}
|
|
|
|
|
</WordsBtn>:"":""
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|