dev_aliyun
杨树明 5 years ago
parent 12a13d43cd
commit ea5cee0c03

@ -48,7 +48,10 @@ class PackageIndexNEITaskDetails extends Component {
} }
componentDidMount() { componentDidMount() {
this.getdatas()
}
getdatas=()=>{
let url =`/api/v1/project_packages/${this.props.match.params.id}.json`; let url =`/api/v1/project_packages/${this.props.match.params.id}.json`;
axios.get(url).then((response) => { axios.get(url).then((response) => {
this.setState({ this.setState({
@ -58,11 +61,8 @@ class PackageIndexNEITaskDetails extends Component {
console.log(error); console.log(error);
}) })
} }
setbiddingman=()=>{ setbiddingman=()=>{
this.setState({ this.setState({
setbiddingmantype:true setbiddingmantype:true
@ -212,6 +212,7 @@ class PackageIndexNEITaskDetails extends Component {
axios.post(url).then((response) => { axios.post(url).then((response) => {
if(response.data.status===0){ if(response.data.status===0){
this.props.showSnackbar("报名成功"); this.props.showSnackbar("报名成功");
this.getdatas()
} }
}).catch((error) => { }).catch((error) => {
console.log(error) console.log(error)
@ -268,9 +269,10 @@ class PackageIndexNEITaskDetails extends Component {
<div className="project-package-item project-package-items height185"> <div className="project-package-item project-package-items height185">
<div className="item-image"> <div className="item-image">
<div className="fl edu-back-white "> <div className="fl edu-back-white ">
<a href={`/users/${data&&data.creator.login}`}>
<img alt="头像" className="radius mt10 ml5" height="70" id="nh_user_logo" name="avatar_image" <img alt="头像" className="radius mt10 ml5" height="70" id="nh_user_logo" name="avatar_image"
src={data&&data.creator.avatar_url} src={data&&data.creator.avatar_url} width="70"/>
width="70"/> </a>
<div className=" edu-back-white ml28 mt10 "> <div className=" edu-back-white ml28 mt10 ">
{data&&data.creator.name} {data&&data.creator.name}
</div> </div>
@ -383,7 +385,7 @@ class PackageIndexNEITaskDetails extends Component {
{data&&data.bidding_users.map((item,key)=>{ {data&&data.bidding_users.map((item,key)=>{
return( return(
<div className="ysldivhomediv1 homehove"> <div className="ysldivhomediv1 homehove">
<img className="div1img" src={item.avatar_url}/> <a href={`/users/${item.login}`}><img className="div1img" src={item.avatar_url}/></a>
<div className="textall mt10" title={item.name}> <p className="ptext">{item.name}</p></div> <div className="textall mt10" title={item.name}> <p className="ptext">{item.name}</p></div>
{this.props.current_user.login!=item.login?<a className="ContacttheTAs fl none" href={`/users/${item.login}/private_messages`}> {this.props.current_user.login!=item.login?<a className="ContacttheTAs fl none" href={`/users/${item.login}/private_messages`}>
<img alt="头像" className="mr5" src={require('./newstwo.png')}/>联系TA <img alt="头像" className="mr5" src={require('./newstwo.png')}/>联系TA
@ -428,7 +430,7 @@ class PackageIndexNEITaskDetails extends Component {
return( return(
<div className="ysldivhomediv1" onClick={()=>this.Clickteacher2(item.id)}> <div className="ysldivhomediv1" onClick={()=>this.Clickteacher2(item.id)}>
{item.bool===true?<img src={gouxuan} className="yslgouxuanimg"/>:<img src={weigouxuan} className="yslgouxuanimg"/>} {item.bool===true?<img src={gouxuan} className="yslgouxuanimg"/>:<img src={weigouxuan} className="yslgouxuanimg"/>}
<img className="div1img" src={item.avatar_url}/> <a href={`/users/${item.login}`}><img className="div1img" src={item.avatar_url}/></a>
<span className={item.bool===true?"textall mt10 color-blue":"textall mt10"} title={item.name}> <p className="ptext">{item.name}</p></span> <span className={item.bool===true?"textall mt10 color-blue":"textall mt10"} title={item.name}> <p className="ptext">{item.name}</p></span>
</div> </div>
) )

@ -209,7 +209,7 @@ class PackageIndexNEIBannerConcent extends Component {
let {min_price,max_price}=this.state; let {min_price,max_price}=this.state;
if(min_price===undefined||max_price===undefined){ if(min_price===undefined){
this.setState({ this.setState({
min_pricetype:true min_pricetype:true
}) })
@ -231,19 +231,19 @@ class PackageIndexNEIBannerConcent extends Component {
}) })
} }
if(parseInt(max_price)===undefined||parseInt(max_price)===null||parseInt(max_price)===""){ // if(parseInt(max_price)===undefined||parseInt(max_price)===null||parseInt(max_price)===""){
//
this.setState({ // this.setState({
min_pricetype:true // min_pricetype:true
}) // })
//
}else{ // }else{
this.setState({ // this.setState({
min_pricetype:false // min_pricetype:false
}) // })
} // }
if(parseInt(min_price)<=0||parseInt(max_price)<=0){ if(parseInt(min_price)<=0){
this.setState({ this.setState({
smallstype:true smallstype:true
}) })
@ -317,7 +317,7 @@ class PackageIndexNEIBannerConcent extends Component {
return return
} }
if(min_price===undefined||max_price===undefined){ if(min_price===undefined){
this.setState({ this.setState({
min_pricetype:true min_pricetype:true
}) })
@ -334,14 +334,14 @@ class PackageIndexNEIBannerConcent extends Component {
return return
} }
if(parseInt(max_price)===undefined||parseInt(max_price)===null||parseInt(max_price)===""){ // if(parseInt(max_price)===undefined||parseInt(max_price)===null||parseInt(max_price)===""){
this.setState({ // this.setState({
min_pricetype:true // min_pricetype:true
}) // })
return // return
} // }
if(parseInt(min_price)<=0||parseInt(max_price)<=0){ if(parseInt(min_price)<=0){
this.setState({ this.setState({
smallstype:true smallstype:true
}) })

@ -358,6 +358,7 @@ class NewHeader extends Component {
<li><a href={`/users/${current_user.login}?type=${current_user.is_teacher ? 'p_shixun' : 'l_shixun'}`}>我的实训</a></li> <li><a href={`/users/${current_user.login}?type=${current_user.is_teacher ? 'p_shixun' : 'l_shixun'}`}>我的实训</a></li>
<li><a href={`/users/${current_user.login}?type=${current_user.is_teacher ? 'p_path' : 'l_path'}`}>我的实践课程</a></li> <li><a href={`/users/${current_user.login}?type=${current_user.is_teacher ? 'p_path' : 'l_path'}`}>我的实践课程</a></li>
<li><a href={`/users/${current_user.login}?type=p_project`}>我的项目</a></li> <li><a href={`/users/${current_user.login}?type=p_project`}>我的项目</a></li>
<li><a href={`/users/${current_user.login}?type=a_package`}>我的众包</a></li>
<li><a href="/my/account">账号管理</a></li> <li><a href="/my/account">账号管理</a></li>
<li className="bor-top-greyE"><a href="/logout">退出</a></li> <li className="bor-top-greyE"><a href="/logout">退出</a></li>
</ul> </ul>

Loading…
Cancel
Save