diff --git a/public/react/src/modules/tpm/TPMBanner.js b/public/react/src/modules/tpm/TPMBanner.js index 25dcd3bd9..cb8d48a2a 100644 --- a/public/react/src/modules/tpm/TPMBanner.js +++ b/public/react/src/modules/tpm/TPMBanner.js @@ -808,10 +808,10 @@ class TPMBanner extends Component { setCollect=()=>{ - let id = this.props.match.params.shixunId; + let {shixunsDetails} = this.props; let url ="/collections.json"; axios.post(url,{ - container_id:id, + container_id:shixunsDetails.id, container_type:"Shixun" }).then((result)=>{ const status = result.data.status @@ -826,10 +826,10 @@ class TPMBanner extends Component { } cancelCollect=()=>{ - let id = this.props.match.params.shixunId; + let {shixunsDetails} = this.props; let url=`/collections/cancel.json`; axios.delete(url,{ data:{ - container_id:id, + container_id:shixunsDetails.id, container_type:"Shixun" }}).then((response) => { const status = response.data.status