dev_auth
杨树明 5 years ago
parent 26c2b47dac
commit 4892d4f987

@ -606,7 +606,14 @@ submittojoinclass=(value)=>{
) )
} }
//头部获取是否已经登录了 //头部获取是否已经登录了
getUser=(url)=>{ getUser=(url,type)=>{
if(type==="projects"){
if(!this.props.user&&this.props.user.email){
this.openNotification("请先绑定邮箱,谢谢");
return
}
}
// console.log("点击了503") // console.log("点击了503")
// console.log(url); // console.log(url);
let{user} =this.state; let{user} =this.state;
@ -1254,7 +1261,7 @@ submittojoinclass=(value)=>{
{this.props.Headertop===undefined?"": {this.props.Headertop===undefined?"":
<li><a onClick={(url)=>this.getUser("/paths/new")} >新建实践课程</a></li> <li><a onClick={(url)=>this.getUser("/paths/new")} >新建实践课程</a></li>
} }
<li><a onClick={(url)=>this.getUser("/projects/new")} target="_blank">新建开发项目</a></li> <li><a onClick={(url)=>this.getUser("/projects/new","projects")} target="_blank">新建开发项目</a></li>
</ul> </ul>
<ul className="fl with50 edu-txt-center"> <ul className="fl with50 edu-txt-center">

@ -133,7 +133,9 @@ class InfosProject extends Component{
{/* 289 */} {/* 289 */}
{ {
page == 1 && is_current && this.props.current_user && !category && this.props.current_user.user_identity != "学生" ? page == 1 && is_current && this.props.current_user && !category && this.props.current_user.user_identity != "学生" ?
<Create href={`${this.props.Headertop && this.props.Headertop.old_url}/projects/new`} name={"新建开发项目"} index="4"></Create>:"" <Create href={`${this.props.Headertop && this.props.Headertop.old_url}/projects/new`} name={"新建开发项目"} index="4" Createtype={"projects"}
{...this.props} {...this.state}
></Create>:""
} }
{ {
(!data || (data && data.projects.length==0)) && category && <NoneData></NoneData> (!data || (data && data.projects.length==0)) && category && <NoneData></NoneData>

@ -14,17 +14,36 @@ class publicCreateNew extends Component{
constructor(props){ constructor(props){
super(props); super(props);
} }
//头部获取是否已经登录了
getUser=(url)=> {
console.log(this.props)
if (!this.props.user && this.props.user.email) {
this.props.showNotification("请先绑定邮箱,谢谢");
return
}
if(url !== undefined || url!==""){
window.location.href = url;
}
}
render() { render() {
let {href,name,index}=this.props; let {href,name,index}=this.props;
return ( return (
<div className="square-Item" style={{"height":`${index=="1"?"289":index=="2"?"298":index=="3"?"295":"289"}px`}}> <div className="square-Item" style={{"height":`${index=="1"?"289":index=="2"?"298":index=="3"?"295":"289"}px`}}>
<div className="substance substancepad"> <div className="substance substancepad">
<a href={`${href}`}> {this.props.Createtype==="projects"?<a onClick={()=>this.getUser(href)}>
<div className="substancenenew"> <div className="substancenenew">
<div className="leftten"></div> <div className="leftten"></div>
<div className="topten"></div> <div className="topten"></div>
</div> </div>
</a> </a>: <a href={`${href}`}>
<div className="substancenenew">
<div className="leftten"></div>
<div className="topten"></div>
</div>
</a>}
</div> </div>
<div className="edu-txt-center course-bottom"> <div className="edu-txt-center course-bottom">
<div className="inline color-grey-6"> <div className="inline color-grey-6">

Loading…
Cancel
Save