实训功能调整

dev_forum
杨树明 5 years ago
parent eebc428d42
commit 2d8776952c

@ -914,11 +914,9 @@ export default class TPMevaluation extends Component {
<div className="edu-back-white mb10 clearfix">
<div className="padding40-20">
<p className="color-grey-6 font-16 mb20">效果展现方式</p>
<div className="pr" onMouseLeave={this.handpathoptionvaluess}>
<div className="pr">
<Select className="winput-240-40"
value={pathoptionvalue}
onMouseEnter={this.handpathoptionvalues}
open={handpathopt}
onChange={this.handpathoptionvalue}>
<Option value={-1}>请选择效果展现方式</Option>
<Option value={1}>图片</Option>

@ -174,43 +174,48 @@ class Challenges extends Component {
}
//开始实战按钮
startshixunCombat = (type, ids, path) => {
let { ChallengesDataList } = this.state;
let id = this.props.match.params.shixunId;
if (type > 3 || type === false) {
this.setState({
startbtns: true
})
let url = "/shixuns/" + id + "/shixun_exec.json";
axios.get(url).then((response) => {
let { ChallengesDataList } = this.state;
if(path===null){
let id = this.props.match.params.shixunId;
this.setState({
startbtns: true
})
let url = "/shixuns/" + id + "/shixun_exec.json";
axios.get(url).then((response) => {
if (response.data.status === -2) {
this.setState({
startbtns:false,
shixunsreplace:true,
hidestartshixunsreplacevalue:response.data.message+".json"
})
} else if (response.data.status === -1) {
console.log(response)
}else if(response.data.status===-3){
this.setState({
shixunsmessage:response.data.message,
startshixunCombattype:true,
startbtns:false
})
} else {
window.location.href = "/tasks/" + response.data.game_identifier;
// window.location.href = path
// let path="/tasks/"+response.data.game_identifier;
// this.props.history.push(path);
}
}).catch((error) => {
this.setState({
startbtns: false
})
});
}else{
if (type > 4 || type === false) {
window.location.href = path;
} else {
window.location.href = "/shixuns/" + ChallengesDataList.shixun_identifier + "/challenges/" + ids + path;
}
}
if (response.data.status === -2) {
this.setState({
startbtns:false,
shixunsreplace:true,
hidestartshixunsreplacevalue:response.data.message+".json"
})
} else if (response.data.status === -1) {
console.log(response)
}else if(response.data.status===-3){
this.setState({
shixunsmessage:response.data.message,
startshixunCombattype:true,
startbtns:false
})
} else {
window.location.href = "/tasks/" + response.data.game_identifier;
// window.location.href = path
// let path="/tasks/"+response.data.game_identifier;
// this.props.history.push(path);
}
}).catch((error) => {
this.setState({
startbtns: false
})
});
} else {
window.location.href = "/shixuns/" + ChallengesDataList.shixun_identifier + "/challenges/" + ids + path;
}
}
hidestartshixunCombattype=()=>{

Loading…
Cancel
Save