diff --git a/src/forge/Merge/NewMerge.js b/src/forge/Merge/NewMerge.js index 2ef27efa..3cbe4ddc 100644 --- a/src/forge/Merge/NewMerge.js +++ b/src/forge/Merge/NewMerge.js @@ -178,7 +178,7 @@ class NewMerge extends Component { let arr = projects_names && projects_names.filter(item=>item.id===value); let identifier = arr && arr[0].project_id; let login = arr && arr[0].project_user_login; - let is_fork_id = parseInt(value) !== parseInt(id) + let is_fork_id = parseInt(value) !== parseInt(id); this.setState({ isSpin: true, merge_head: is_fork_id, diff --git a/src/forge/Merge/merge_form.js b/src/forge/Merge/merge_form.js index 57886d04..1c75a9f9 100644 --- a/src/forge/Merge/merge_form.js +++ b/src/forge/Merge/merge_form.js @@ -34,17 +34,19 @@ class MergeForm extends Component { this.set_defatul(); }; componentDidUpdate=(prevPros)=>{ + const { projectsId ,owner } = this.props.match.params; + const pId = prevPros.match.params.projectsId; + const oId = prevPros.match.params.owner; + if(pId !== projectsId || oId !== owner ){ + // console.log("切换了项目分支···········"); + this.get_default_selects(); + } if(prevPros && this.props && !this.props.checkIfLogin()){ this.props.history.push("/403") return } } - // check_is_login =() =>{ - // if(!this.props.checkIfLogin()){ - // this.props.history.push("/403") - // return - // } - // }; + get_default_selects = () => { const { projectsId ,owner } = this.props.match.params; this.setState({ isSpin: true }); diff --git a/src/forge/Order/MilepostDetail.js b/src/forge/Order/MilepostDetail.js index 2cfb2f89..7954630d 100644 --- a/src/forge/Order/MilepostDetail.js +++ b/src/forge/Order/MilepostDetail.js @@ -218,7 +218,7 @@ class MilepostDetail extends Component {
- 尚未创建任务的实训,不能申请发布 + 尚未创建易修的实训,不能申请发布