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

@ -48,20 +48,20 @@ class PackageIndexNEITaskDetails extends Component {
}
componentDidMount() {
this.getdatas()
}
let url =`/api/v1/project_packages/${this.props.match.params.id}.json`;
axios.get(url).then((response) => {
this.setState({
getdatas=()=>{
let url =`/api/v1/project_packages/${this.props.match.params.id}.json`;
axios.get(url).then((response) => {
this.setState({
data:response.data
})
}).catch((error) => {
console.log(error);
})
}
}).catch((error) => {
console.log(error);
})
}
setbiddingman=()=>{
this.setState({
@ -212,6 +212,7 @@ class PackageIndexNEITaskDetails extends Component {
axios.post(url).then((response) => {
if(response.data.status===0){
this.props.showSnackbar("报名成功");
this.getdatas()
}
}).catch((error) => {
console.log(error)
@ -268,9 +269,10 @@ class PackageIndexNEITaskDetails extends Component {
<div className="project-package-item project-package-items height185">
<div className="item-image">
<div className="fl edu-back-white ">
<img alt="头像" className="radius mt10 ml5" height="70" id="nh_user_logo" name="avatar_image"
src={data&&data.creator.avatar_url}
width="70"/>
<a href={`/users/${data&&data.creator.login}`}>
<img alt="头像" className="radius mt10 ml5" height="70" id="nh_user_logo" name="avatar_image"
src={data&&data.creator.avatar_url} width="70"/>
</a>
<div className=" edu-back-white ml28 mt10 ">
{data&&data.creator.name}
</div>
@ -383,7 +385,7 @@ class PackageIndexNEITaskDetails extends Component {
{data&&data.bidding_users.map((item,key)=>{
return(
<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>
{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
@ -428,7 +430,7 @@ class PackageIndexNEITaskDetails extends Component {
return(
<div className="ysldivhomediv1" onClick={()=>this.Clickteacher2(item.id)}>
{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>
</div>
)

@ -209,7 +209,7 @@ class PackageIndexNEIBannerConcent extends Component {
let {min_price,max_price}=this.state;
if(min_price===undefined||max_price===undefined){
if(min_price===undefined){
this.setState({
min_pricetype:true
})
@ -231,19 +231,19 @@ class PackageIndexNEIBannerConcent extends Component {
})
}
if(parseInt(max_price)===undefined||parseInt(max_price)===null||parseInt(max_price)===""){
this.setState({
min_pricetype:true
})
}else{
this.setState({
min_pricetype:false
})
}
if(parseInt(min_price)<=0||parseInt(max_price)<=0){
// if(parseInt(max_price)===undefined||parseInt(max_price)===null||parseInt(max_price)===""){
//
// this.setState({
// min_pricetype:true
// })
//
// }else{
// this.setState({
// min_pricetype:false
// })
// }
if(parseInt(min_price)<=0){
this.setState({
smallstype:true
})
@ -317,7 +317,7 @@ class PackageIndexNEIBannerConcent extends Component {
return
}
if(min_price===undefined||max_price===undefined){
if(min_price===undefined){
this.setState({
min_pricetype:true
})
@ -334,14 +334,14 @@ class PackageIndexNEIBannerConcent extends Component {
return
}
if(parseInt(max_price)===undefined||parseInt(max_price)===null||parseInt(max_price)===""){
this.setState({
min_pricetype:true
})
return
}
// if(parseInt(max_price)===undefined||parseInt(max_price)===null||parseInt(max_price)===""){
// this.setState({
// min_pricetype:true
// })
// return
// }
if(parseInt(min_price)<=0||parseInt(max_price)<=0){
if(parseInt(min_price)<=0){
this.setState({
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_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=a_package`}>我的众包</a></li>
<li><a href="/my/account">账号管理</a></li>
<li className="bor-top-greyE"><a href="/logout">退出</a></li>
</ul>

Loading…
Cancel
Save