实训功能调整

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="edu-back-white mb10 clearfix">
<div className="padding40-20"> <div className="padding40-20">
<p className="color-grey-6 font-16 mb20">效果展现方式</p> <p className="color-grey-6 font-16 mb20">效果展现方式</p>
<div className="pr" onMouseLeave={this.handpathoptionvaluess}> <div className="pr">
<Select className="winput-240-40" <Select className="winput-240-40"
value={pathoptionvalue} value={pathoptionvalue}
onMouseEnter={this.handpathoptionvalues}
open={handpathopt}
onChange={this.handpathoptionvalue}> onChange={this.handpathoptionvalue}>
<Option value={-1}>请选择效果展现方式</Option> <Option value={-1}>请选择效果展现方式</Option>
<Option value={1}>图片</Option> <Option value={1}>图片</Option>

@ -174,43 +174,48 @@ class Challenges extends Component {
} }
//开始实战按钮 //开始实战按钮
startshixunCombat = (type, ids, path) => { startshixunCombat = (type, ids, path) => {
let { ChallengesDataList } = this.state; let { ChallengesDataList } = this.state;
let id = this.props.match.params.shixunId; if(path===null){
if (type > 3 || type === false) { let id = this.props.match.params.shixunId;
this.setState({ this.setState({
startbtns: true startbtns: true
}) })
let url = "/shixuns/" + id + "/shixun_exec.json"; let url = "/shixuns/" + id + "/shixun_exec.json";
axios.get(url).then((response) => { 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=()=>{ hidestartshixunCombattype=()=>{

Loading…
Cancel
Save