|
|
|
@ -20,6 +20,8 @@ import '../shixunchildCss/Challenges.css'
|
|
|
|
|
|
|
|
|
|
import axios from 'axios';
|
|
|
|
|
|
|
|
|
|
import AccountProfile from"../../../user/AccountProfile";
|
|
|
|
|
|
|
|
|
|
const $ = window.$;
|
|
|
|
|
|
|
|
|
|
class Challenges extends Component {
|
|
|
|
@ -218,7 +220,14 @@ class Challenges extends Component {
|
|
|
|
|
|
|
|
|
|
//开始实战按钮
|
|
|
|
|
startshixunCombat = (type, ids, id) => {
|
|
|
|
|
if(this.props.current_user&&this.props.current_user.profile_completed===false){
|
|
|
|
|
this.setState({
|
|
|
|
|
AccountProfiletype:true
|
|
|
|
|
})
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
debugger
|
|
|
|
|
let { ChallengesDataList } = this.state;
|
|
|
|
|
// let id = this.props.match.params.shixunId;
|
|
|
|
|
this.setState({
|
|
|
|
@ -271,8 +280,15 @@ class Challenges extends Component {
|
|
|
|
|
startshixunCombattype:false
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
hideAccountProfile=()=>{
|
|
|
|
|
this.setState({
|
|
|
|
|
AccountProfiletype:false
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
render() {
|
|
|
|
|
let { ChallengesDataList, startbtns, sumidtype ,startshixunCombattype,shixunsreplace,shixunsmessage,hidestartshixunsreplacevalue,operationstrue} = this.state;
|
|
|
|
|
let { ChallengesDataList, startbtns, sumidtype ,startshixunCombattype,shixunsreplace,shixunsmessage,hidestartshixunsreplacevalue,operationstrue,AccountProfiletype} = this.state;
|
|
|
|
|
let { loadingContent } = this.props;
|
|
|
|
|
if (ChallengesDataList != undefined) {
|
|
|
|
|
this.updatamakedown("ReactMarkdown")
|
|
|
|
@ -281,6 +297,12 @@ class Challenges extends Component {
|
|
|
|
|
const antIcon = <Icon type="loading" style={{ fontSize: 24 }} spin />;
|
|
|
|
|
return (
|
|
|
|
|
<React.Fragment>
|
|
|
|
|
{AccountProfiletype===true?<AccountProfile
|
|
|
|
|
hideAccountProfile={()=>this.hideAccountProfile()}
|
|
|
|
|
{...this.state}
|
|
|
|
|
{...this.props}
|
|
|
|
|
/>:""}
|
|
|
|
|
|
|
|
|
|
{loadingContent ?
|
|
|
|
|
<CircularProgress size={40} thickness={3} style={{
|
|
|
|
|
marginLeft: 'auto',
|
|
|
|
|