diff --git a/src/forge/Main/Detail.js b/src/forge/Main/Detail.js index 2dc4ac1a..a177234e 100644 --- a/src/forge/Main/Detail.js +++ b/src/forge/Main/Detail.js @@ -156,13 +156,14 @@ class Detail extends Component { componentDidUpdate = (prevState) => { if ((prevState.match.params.projectsId !== this.props.match.params.projectsId)) { + this.getProject(); this.getDetail(); } } getProject = () => { const { projectsId } = this.props.match.params; - const url = `/repositories/${projectsId}.json`; + const url = `/projects/${projectsId}/simple.json`; axios.get(url).then((result) => { this.setState({ project: result.data @@ -172,7 +173,7 @@ class Detail extends Component { getDetail = () => { const { projectsId } = this.props.match.params; - const url = `/repositories/${projectsId}/simple.json`; + const url = `/repositories/${projectsId}.json`; axios.get(url).then((result) => { if (result) { this.setState({ @@ -285,6 +286,7 @@ class Detail extends Component { axios.post(url).then(result=>{ if(result && result.data && result.data.status === 0){ this.props.showNotification("镜像同步成功!"); + this.getProject(); this.getDetail(); }else{ this.props.showNotification("镜像同步失败!");