forked from Gitlink/forgeplus-react
新建文件的相关问题
This commit is contained in:
parent
e03dc3e90f
commit
9081805bad
|
@ -158,6 +158,16 @@ class Detail extends Component{
|
|||
if((prevState.match.params.projectsId !== this.props.match.params.projectsId)){
|
||||
this.getDetail();
|
||||
}
|
||||
|
||||
const { search } = this.props.location;
|
||||
const search_c = prevState.location && prevState.location.search;
|
||||
if( search && search!== search_c){
|
||||
// console.log("branches",this.props.location);
|
||||
// console.log("branches_p",prevState.location);
|
||||
// console.log("111",this.props.dataquerys);
|
||||
const { projectsId } = this.props.match.params;
|
||||
this.getBranch(projectsId);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -37,7 +37,8 @@ class UserSubmitComponent extends Component{
|
|||
message:values.desc
|
||||
}).then((result)=>{
|
||||
if(result && result.data.name){
|
||||
this.props.history.push(`/projects/${projectsId}/coders?branch=${values.branchname}`);
|
||||
const url = values.branchname ? `/projects/${projectsId}/coders?branch=${values.branchname}` : `/projects/${projectsId}/coders`;
|
||||
this.props.history.push(url);
|
||||
}
|
||||
}).catch(error=>{
|
||||
console.log(error);
|
||||
|
|
Loading…
Reference in New Issue