dev_forge
caicai8 5 years ago
parent 8a69de521a
commit c2fda64b87

@ -126,9 +126,10 @@ class CoderRootDirectory extends Component{
const { current_user } = this.props;
const { projectsId } = this.props.match.params;
const { branch } = this.state;
const { state } = this.props.history.location;
const url =`/${this.props&&current_user.login}/${projectsId}/sub_entries.json`;
const url =`/${state}/${projectsId}/sub_entries.json`;
axios.get(url,{
params:{
@ -209,7 +210,6 @@ class CoderRootDirectory extends Component{
}
render(){
const { rootList , branch ,filePath , fileDetail , subFileType , readMeContent, isSpin , rootData } = this.state;
console.log("ddd",rootData);
const { branchLastCommit , http_url , isManager , isDeveloper } = this.props;
const { projectsId } = this.props.match.params;

@ -172,9 +172,9 @@ class Detail extends Component{
// }
getDetail=()=>{
const { current_user } = this.props;
const { state } = this.props.history.location;
const { projectsId } = this.props.match.params;
const url = `/${current_user&&current_user.login}/${projectsId}.json`;
const url = `/${state}/${projectsId}.json`;
axios.get(url).then((result)=>{
if(result){
this.setState({
@ -291,8 +291,8 @@ class Detail extends Component{
const url = this.props.history.location.pathname;
const urlFlag = (url.split("/").length === 3);
const { isManager , isDeveloper } = this.props;
const { projectsId } = this.props.match.params;
return(
<div>
<div className="detailHeader-wrapper">

@ -16,7 +16,10 @@ class IndexItem extends Component{
<img className="p-r-photo" alt="" src={getImageUrl(`images/${item.author && item.author.image_url}`)} ></img>
<div className="p-r-Infos">
<div className="p-r-name">
<Link to={`/projects/${item.identifier}/coder`} className="hide-1 font-16 color-grey-3" style={{whiteSpace:"wrap"}}>{item.name}</Link>
<Link to={{
pathname: `/projects/${item.identifier}/coder`,
state: `${item.author && item.author.login}`,
}} className="hide-1 font-16 color-grey-3" style={{whiteSpace:"wrap"}}>{item.name}</Link>
</div>
<div className="p-r-content">

Loading…
Cancel
Save