|
|
|
@ -33,7 +33,7 @@ class Challenges extends Component {
|
|
|
|
|
isSpin:false,
|
|
|
|
|
boxoffsetHeigh:0,
|
|
|
|
|
opentitletype:true,
|
|
|
|
|
isopentitletype:"Less",
|
|
|
|
|
isopentitletype:"Less"
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -357,6 +357,50 @@ class Challenges extends Component {
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 开启挑战
|
|
|
|
|
beginChallenge=(url)=>{
|
|
|
|
|
if (this.props.checkIfLogin() === false) {
|
|
|
|
|
this.props.showLoginDialog()
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
if (this.props.checkIfProfileCompleted() === false) {
|
|
|
|
|
this.setState({
|
|
|
|
|
AccountProfiletype: true
|
|
|
|
|
})
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
this.setState({
|
|
|
|
|
startbtns:true
|
|
|
|
|
})
|
|
|
|
|
if(url.indexOf(".json")>-1){
|
|
|
|
|
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) {
|
|
|
|
|
this.setState({
|
|
|
|
|
startbtns: false
|
|
|
|
|
})
|
|
|
|
|
}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;
|
|
|
|
|
}
|
|
|
|
|
}).catch((error) => {
|
|
|
|
|
|
|
|
|
|
});
|
|
|
|
|
}else{
|
|
|
|
|
window.location.href=url;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
render() {
|
|
|
|
|
let { ChallengesDataList, startbtns, sumidtype ,startshixunCombattype,shixunsreplace,shixunsmessage,hidestartshixunsreplacevalue,operationstrue,AccountProfiletype} = this.state;
|
|
|
|
|
let { loadingContent } = this.props;
|
|
|
|
@ -700,49 +744,60 @@ class Challenges extends Component {
|
|
|
|
|
</span>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div className="challengtes_Item">
|
|
|
|
|
<div className="flex1">
|
|
|
|
|
<div className="clearfix mb5">
|
|
|
|
|
{/*onClick={() => this.EditTraining(this.props.identity, item.challenge_id, "/editquestion")}*/}
|
|
|
|
|
{this.props.identity<5?
|
|
|
|
|
item.st === 1 ?
|
|
|
|
|
<div className="font-16 color05101a fonthiddens">{item.name}</div>
|
|
|
|
|
:
|
|
|
|
|
<div className="font-16 color05101a fonthiddens">{item.name}</div>:<div
|
|
|
|
|
// onClick={() => this.startshixunCombat(this.props.identity, item.challenge_id, "/editcheckpoint")}
|
|
|
|
|
className="font-16 color05101a fonthiddens">{item.name}</div>
|
|
|
|
|
}
|
|
|
|
|
{/* onClick={() => this.EditTraining(this.props.identity, item.challenge_id, "/editcheckpoint")}*/}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
<div className="clearfix">
|
|
|
|
|
<style>
|
|
|
|
|
{
|
|
|
|
|
`
|
|
|
|
|
.task-colspan {
|
|
|
|
|
min-width: 18% !important;
|
|
|
|
|
}
|
|
|
|
|
`
|
|
|
|
|
}
|
|
|
|
|
</style>
|
|
|
|
|
<span className="task-colspan"><span className={"shixunbingbaocun12"}>正在挑战: </span><span className={"shixunbingbaocun33312"}>{item.playing_count}人</span></span>
|
|
|
|
|
<span className="task-colspan"><span className={"shixunbingbaocun12"}>完成挑战: </span><span className={"shixunbingbaocun33312"}>{item.passed_count}人</span></span>
|
|
|
|
|
<span className="task-colspan"><span className={"shixunbingbaocun12"}>可获经验: </span><span className={"shixunbingbaocun33312"}>{item.score}点</span></span>
|
|
|
|
|
|
|
|
|
|
<div className="clearfix mb5">
|
|
|
|
|
{/*onClick={() => this.EditTraining(this.props.identity, item.challenge_id, "/editquestion")}*/}
|
|
|
|
|
{this.props.identity<5?
|
|
|
|
|
item.st === 1 ?
|
|
|
|
|
<div className="font-16 color05101a fonthiddens">{item.name}</div>
|
|
|
|
|
:
|
|
|
|
|
<div className="font-16 color05101a fonthiddens">{item.name}</div>:<div
|
|
|
|
|
// onClick={() => this.startshixunCombat(this.props.identity, item.challenge_id, "/editcheckpoint")}
|
|
|
|
|
className="font-16 color05101a fonthiddens">{item.name}</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
{
|
|
|
|
|
item.open_game ?
|
|
|
|
|
<a onClick={()=>this.beginChallenge(item.open_game)} className="challengeBtn blue">开启挑战</a>
|
|
|
|
|
:
|
|
|
|
|
<span className="challengeBtn">开启挑战</span>
|
|
|
|
|
}
|
|
|
|
|
{/* onClick={() => this.EditTraining(this.props.identity, item.challenge_id, "/editcheckpoint")}*/}
|
|
|
|
|
|
|
|
|
|
<Modal
|
|
|
|
|
keyboard={false}
|
|
|
|
|
visible={startbtns}
|
|
|
|
|
closable={false}
|
|
|
|
|
footer={null}
|
|
|
|
|
className="startbtnModal"
|
|
|
|
|
>
|
|
|
|
|
<Spin size="large" />
|
|
|
|
|
</Modal>
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
<div className="clearfix">
|
|
|
|
|
<style>
|
|
|
|
|
{
|
|
|
|
|
`
|
|
|
|
|
.task-colspan {
|
|
|
|
|
min-width: 18% !important;
|
|
|
|
|
}
|
|
|
|
|
`
|
|
|
|
|
}
|
|
|
|
|
</style>
|
|
|
|
|
<span className="task-colspan"><span className={"shixunbingbaocun12"}>正在挑战: </span><span className={"shixunbingbaocun33312"}>{item.playing_count}人</span></span>
|
|
|
|
|
<span className="task-colspan"><span className={"shixunbingbaocun12"}>完成挑战: </span><span className={"shixunbingbaocun33312"}>{item.passed_count}人</span></span>
|
|
|
|
|
<span className="task-colspan"><span className={"shixunbingbaocun12"}>可获经验: </span><span className={"shixunbingbaocun33312"}>{item.score}点</span></span>
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
)
|
|
|
|
|
})}
|
|
|
|
|
</div>
|
|
|
|
|
<Modal
|
|
|
|
|
keyboard={false}
|
|
|
|
|
visible={startbtns}
|
|
|
|
|
closable={false}
|
|
|
|
|
footer={null}
|
|
|
|
|
className="startbtnModal"
|
|
|
|
|
centered={true}
|
|
|
|
|
>
|
|
|
|
|
<Spin size="large" />
|
|
|
|
|
</Modal>
|
|
|
|
|
<Modal
|
|
|
|
|
keyboard={false}
|
|
|
|
|
title="提示"
|
|
|
|
@ -765,7 +820,6 @@ class Challenges extends Component {
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
</Modal>
|
|
|
|
|
|
|
|
|
|
<Modal
|
|
|
|
|
keyboard={false}
|
|
|
|
|
title="提示"
|
|
|
|
|