dev_daiao
杨树明 5 years ago
parent 7cc5b10a6c
commit b9b62fc0cc

@ -48,7 +48,9 @@ class YslDetailCards extends Component{
}; };
hideparagraph=()=>{ hideparagraph=()=>{
this.setState({ this.setState({
showparagraph:false showparagraph:false,
showparagraphkey:null,
showparagraphindex:null
}) })
}; };
startgameid=(id)=>{ startgameid=(id)=>{
@ -499,17 +501,23 @@ class YslDetailCards extends Component{
this.props.current_user&&this.props.current_user.admin===false&&line.shixun_status==="暂未公开"? this.props.current_user&&this.props.current_user.admin===false&&line.shixun_status==="暂未公开"?
<li className="fr status_li"><span className="fr color204">暂未公开</span></li> <li className="fr status_li"><span className="fr color204">暂未公开</span></li>
: :
<li className={showparagraph===false?"fr status_li":"fr status_li"}> <li className={showparagraph===false?"none":"fr status_li"}>
{ {
showparagraphkey===key&&showparagraphindex===index?<div> showparagraphkey===key&&showparagraphindex===index?<div>
<Link to={'/shixuns/'+line.identifier+'/challenges'} className="mr30 color-blue_4C shixun_detail pointer fl" target="_blank">查看详情</Link> <Link to={'/shixuns/'+line.identifier+'/challenges'} className="mr30 color-blue_4C shixun_detail pointer fl" target="_blank">查看详情</Link>
{line.shixun_status==="暂未公开"?"":<a onClick={()=>this.startgameid(line.identifier)} className="btn_auto user_bluebg_btn fl" id="shixun_operation" >开始学习</a>} {line.shixun_status==="暂未公开"?"":<a onClick={()=>this.startgameid(line.identifier)} className="btn_auto user_bluebg_btn fl" id="shixun_operation" >开始学习</a>}
</div>: </div>:""
<span className="fr color204">实验任务 <span className={"color000"}>{line.challenges_count}</span></span>
} }
</li> </li>
} }
<li className={showparagraph===false?"fr status_li":"fr status_li"}>
{
showparagraphkey === key && showparagraphindex === index ? "" :
<span className="fr color204">实验任务 <span
className={"color000"}>{line.challenges_count}</span></span>
}
</li>
</div>) </div>)
}) })
} }

Loading…
Cancel
Save