diff --git a/src/AppConfig.js b/src/AppConfig.js index 3fb14455f..cf7fe8b6a 100644 --- a/src/AppConfig.js +++ b/src/AppConfig.js @@ -82,13 +82,6 @@ export function initAxiosInterceptors(props) { } throw new axios.Cancel('Operation canceled by the user.'); } - if (response.data.status === 403 || response.data.status === "403" || response.data.status === 404) { - if(!window.location.pathname.includes('/releases')){ - locationurl(`/${response.data.status}`); - }else{ - console.log("releases 404了"); - } - } if (response.data.status === 403 || response.data.status === "403") { // locationurl('/403'); diff --git a/src/forge/Main/Detail.js b/src/forge/Main/Detail.js index 8a6593f1c..69b6a5d30 100644 --- a/src/forge/Main/Detail.js +++ b/src/forge/Main/Detail.js @@ -191,7 +191,8 @@ class Detail extends Component { defaultBranch: undefined, // 非本平台项目 - platform: false + platform: false, + mirror_status:1 } } @@ -255,8 +256,14 @@ class Detail extends Component { secondSync: false }) } + this.setState({ + mirror_status:1 + }) } else if (result.data.mirror_status === 2) { this.deleteProjectBack(); + this.setState({ + mirror_status:2 + }) } else { this.getBanner(); this.getDetail(); @@ -527,7 +534,7 @@ class Detail extends Component { const { projectDetail, watchers_count, praises_count, forked_count, firstSync, secondSync, isManager, watched, praised, - project, open_devops, platform, defaultBranch, bannerList, forkSpin } = this.state; + project, open_devops, platform, defaultBranch, bannerList, forkSpin , mirror_status } = this.state; const url = this.props.history.location.pathname; const urlArr = url.split("/"); const urlFlag = (urlArr.length === 3); @@ -753,37 +760,6 @@ class Detail extends Component { (props) => () } > - {/* 里程碑页面新建任务 */} - {/* () - } - > */} - {/* 新建任务 */} - {/* () - } - > */} - {/* 修改详情 edit*/} - {/* () - } - > */} - {/* 复制详情 copyetail*/} - {/* () - } - > */} - - {/* 任务详情 */} - {/* () - } - > */} {/* 动态 */} () } > - {/* 新建合并请求 */} - {/* () - } - > */} () @@ -818,12 +788,6 @@ class Detail extends Component { (props) => () } > - {/* webIDE */} - {/* () - } - > */} () @@ -897,7 +861,7 @@ class Detail extends Component { > () + (props) => (mirror_status!==2 ? :) } >