新建文件的相关问题

This commit is contained in:
caicai8 2020-04-23 11:13:52 +08:00
parent e03dc3e90f
commit 9081805bad
2 changed files with 12 additions and 1 deletions

View File

@ -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);
}
}

View File

@ -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);