diff --git a/src/AppConfig.js b/src/AppConfig.js index fcc74368d..68dd5439a 100644 --- a/src/AppConfig.js +++ b/src/AppConfig.js @@ -128,7 +128,7 @@ export function initAxiosInterceptors(props) { // TODO 读取到package.json中的配置? var //proxy = "http://localhost:3000" - proxy="http://123.59.135.93:56666" + proxy="https://testforgeplus.trustie.net" // proxy="http://localhost:3000" // 在这里使用requestMap控制,避免用户通过双击等操作发出重复的请求; diff --git a/src/forge/Main/CoderRootCommit.js b/src/forge/Main/CoderRootCommit.js index 2aa0d353b..d77e4ec2c 100644 --- a/src/forge/Main/CoderRootCommit.js +++ b/src/forge/Main/CoderRootCommit.js @@ -28,9 +28,8 @@ class CoderRootCommit extends Component{ } getCommitList=(branch , page , limit)=>{ - const { login } = this.props.current_user; const { projectsId } = this.props.match.params; - const url = `/${login}/${projectsId}/commits.json`; + const url = `/repositories/${projectsId}/commits.json`; axios.get(url,{ params:{ sha:branch, diff --git a/src/forge/Main/CoderRootDirectory.js b/src/forge/Main/CoderRootDirectory.js index ff6e32352..5bc089820 100644 --- a/src/forge/Main/CoderRootDirectory.js +++ b/src/forge/Main/CoderRootDirectory.js @@ -62,11 +62,9 @@ class CoderRootDirectory extends Component{ // 获取根目录 getProjectRoot=(branch)=>{ - const { current_user } = this.props; - const { projectsId , author } = this.props.match.params; - const { state } = this.props.history.location; + const { projectsId } = this.props.match.params; console.log(this.props); - const url = `/${author}/${projectsId}/entries.json`; + const url = `/repositories/${projectsId}/entries.json`; axios.get((url),{ params:{ branch @@ -125,13 +123,11 @@ class CoderRootDirectory extends Component{ // 获取子目录 getFileDetail=(arr)=>{ - const { current_user } = this.props; const { projectsId } = this.props.match.params; const { branch } = this.state; - const { state } = this.props.history.location; - const url =`/${state ? state : current_user && current_user.login}/${projectsId}/sub_entries.json`; + const url =`/repositories/${projectsId}/sub_entries.json`; axios.get(url,{ params:{ diff --git a/src/forge/Main/Detail.js b/src/forge/Main/Detail.js index 01133e205..ccaf6990e 100644 --- a/src/forge/Main/Detail.js +++ b/src/forge/Main/Detail.js @@ -153,7 +153,6 @@ class Detail extends Component{ this.setState({ current_user:result.data }) - this.getDetail(); } }).catch(error=>{ console.log(error) @@ -173,8 +172,8 @@ class Detail extends Component{ // } getDetail=()=>{ - const { projectsId , author } = this.props.match.params; - const url = `/${author}/${projectsId}.json`; + const { projectsId } = this.props.match.params; + const url = `/repositories/${projectsId}.json`; axios.get(url).then((result)=>{ if(result){ this.setState({ diff --git a/src/forge/Main/IndexItem.js b/src/forge/Main/IndexItem.js index b9b463836..17341a215 100644 --- a/src/forge/Main/IndexItem.js +++ b/src/forge/Main/IndexItem.js @@ -28,7 +28,7 @@ class IndexItem extends Component{ {item.name}
{item.description}
+{item.description}
{/* { item.forked_count ? { item.forked_count}:"" } */}