diff --git a/public/react/src/modules/projectPackages/PackageIndexNEITaskDetails/PackageIndexNEITaskDetails.js b/public/react/src/modules/projectPackages/PackageIndexNEITaskDetails/PackageIndexNEITaskDetails.js index b4970651..9f148521 100644 --- a/public/react/src/modules/projectPackages/PackageIndexNEITaskDetails/PackageIndexNEITaskDetails.js +++ b/public/react/src/modules/projectPackages/PackageIndexNEITaskDetails/PackageIndexNEITaskDetails.js @@ -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 {
{item.name}