调整发送至跳转

dev_ec
杨树明 6 years ago
parent ef41db16f2
commit d03d2e2777

@ -268,7 +268,7 @@ class TPMBanner extends Component {
}) })
// window.location.href = response.data.url; // window.location.href = response.data.url;
// response.data.course_id // response.data.course_id
this.props.history.replace("/courses"); this.props.history.replace(response.data.first_category_url);
}).catch((error) => { }).catch((error) => {
console.log(error) console.log(error)

@ -327,7 +327,7 @@ class Challenges extends Component {
<div className="mt30 pl20 pr20"> <div className="mt30 pl20 pr20">
<p className="clearfix mb30"> <p className="clearfix mb20">
<span className="font-16 fl">简介</span> <span className="font-16 fl">简介</span>
<Tooltip placement="bottom" title={"编辑"}> <Tooltip placement="bottom" title={"编辑"}>
<a style={{ display: this.props.identity < 5 && ChallengesDataList&&ChallengesDataList.shixun_status < 3 ? "block" : 'none' }} <a style={{ display: this.props.identity < 5 && ChallengesDataList&&ChallengesDataList.shixun_status < 3 ? "block" : 'none' }}
@ -335,8 +335,35 @@ class Challenges extends Component {
<img src={getImageUrl("images/educoder/icon/edit.svg")} className="fl mt3 ml2" /> <img src={getImageUrl("images/educoder/icon/edit.svg")} className="fl mt3 ml2" />
</a> </a>
</Tooltip> </Tooltip>
</p>
</p>
<p className="clearfix mb20">
{this.props.identity < 5 && ChallengesDataList&&ChallengesDataList.shixun_status=== 0 ?
<Link to={"/shixuns/" + id + "/challenges/new"}
className="white-btn edu-greenline-btn fr"
// data-tip-down="新增代码编辑类型任务"
>
<Tooltip placement="bottom" title={"新增代码编辑类型任务"}>
<img src={getImageUrl("images/educoder/icon/addsmallgreen.svg")}
className="fl mr5 mt6" />
实践任务
</Tooltip>
</Link> : ""
}
{this.props.identity < 5 && ChallengesDataList&&ChallengesDataList.shixun_status=== 0 ?
<Link to={"/shixuns/" + id + "/challenges/newquestion"}
className="white-btn edu-greenline-btn fr mr20"
// data-tip-down="新增选择题类型任务"
>
<Tooltip placement="bottom" title={"新增选择题类型任务"}>
<img src={getImageUrl("images/educoder/icon/addsmallgreen.svg")}
className="fl mr5 mt5" />
选择题任务
</Tooltip>
</Link> : ""
}
</p>
<div className="justify break_full_word new_li " <div className="justify break_full_word new_li "
id="challenge_editorMd_description"> id="challenge_editorMd_description">
<p id="ReactMarkdown" style={{overflow:'hidden'}}> <p id="ReactMarkdown" style={{overflow:'hidden'}}>
@ -353,31 +380,31 @@ class Challenges extends Component {
<p className="clearfix mb10 mt20"> <p className="clearfix mb10 mt20">
<span className="font-16 fl">全部任务</span> <span className="font-16 fl">全部任务</span>
{this.props.identity < 5 && ChallengesDataList&&ChallengesDataList.shixun_status=== 0 ? {this.props.identity < 5 && ChallengesDataList&&ChallengesDataList.shixun_status=== 0 ?
<Link to={"/shixuns/" + id + "/challenges/new"} <Link to={"/shixuns/" + id + "/challenges/new"}
className="white-btn edu-greenline-btn fr" className="white-btn edu-greenline-btn fr"
// data-tip-down="新增代码编辑类型任务" // data-tip-down="新增代码编辑类型任务"
> >
<Tooltip placement="bottom" title={"新增代码编辑类型任务"}> <Tooltip placement="bottom" title={"新增代码编辑类型任务"}>
<img src={getImageUrl("images/educoder/icon/addsmallgreen.svg")} <img src={getImageUrl("images/educoder/icon/addsmallgreen.svg")}
className="fl mr5 mt6" /> className="fl mr5 mt6" />
实践任务 实践任务
</Tooltip> </Tooltip>
</Link> : "" </Link> : ""
} }
{this.props.identity < 5 && ChallengesDataList&&ChallengesDataList.shixun_status=== 0 ? {this.props.identity < 5 && ChallengesDataList&&ChallengesDataList.shixun_status=== 0 ?
<Link to={"/shixuns/" + id + "/challenges/newquestion"} <Link to={"/shixuns/" + id + "/challenges/newquestion"}
className="white-btn edu-greenline-btn fr mr20" className="white-btn edu-greenline-btn fr mr20"
// data-tip-down="新增选择题类型任务" // data-tip-down="新增选择题类型任务"
> >
<Tooltip placement="bottom" title={"新增选择题类型任务"}> <Tooltip placement="bottom" title={"新增选择题类型任务"}>
<img src={getImageUrl("images/educoder/icon/addsmallgreen.svg")} <img src={getImageUrl("images/educoder/icon/addsmallgreen.svg")}
className="fl mr5 mt5" /> className="fl mr5 mt5" />
选择题任务 选择题任务
</Tooltip> </Tooltip>
</Link> : "" </Link> : ""
} }
</p> </p>
<div className="alltask"> <div className="alltask">

@ -152,6 +152,17 @@ class InfosShixun extends Component{
</li> </li>
</div> </div>
</div> </div>
<style>
{
`
.tag-green {
position: absolute;
left: 10px;
bottom: 100px;
}
`
}
</style>
<div className="square-list clearfix"> <div className="square-list clearfix">
{/* 298 */} {/* 298 */}
{ {
@ -166,7 +177,9 @@ class InfosShixun extends Component{
return( return(
<div className="square-Item" style={{"height":"298px"}} onClick={()=>this.turnToCourses(`/shixuns/${item.identifier}/challenges`)}> <div className="square-Item" style={{"height":"298px"}} onClick={()=>this.turnToCourses(`/shixuns/${item.identifier}/challenges`)}>
{ {
item.tag && <div className="tag-green"><span className="tag-name">{item.tag}</span><img className="fl" src={setImagesUrl("images/educoder/tag2.png")}/></div> item.tag && <div className="tag-green"><span className="tag-name">{item.tag}</span>
{/*<img className="fl" src={setImagesUrl("images/educoder/tag2.png")}/>*/}
</div>
} }
<a href="javascript:void(0)" className="square-img"> <a href="javascript:void(0)" className="square-img">
<img src={setImagesUrl(`${item.image_url}`)}/> <img src={setImagesUrl(`${item.image_url}`)}/>

Loading…
Cancel
Save