From 08f271a1c20ef0b4ef6c83da40f7ce967c00f9d1 Mon Sep 17 00:00:00 2001 From: caishi <1149225589@qq.com> Date: Wed, 12 Apr 2023 10:29:35 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AF=BC=E5=85=A5=E9=A1=B9=E7=9B=AE=E5=A4=B1?= =?UTF-8?q?=E8=B4=A5=E5=90=8E404=20=E8=A7=A3=E5=86=B3=E6=96=B9=E6=A1=882?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/AppConfig.js | 7 ----- src/forge/Main/Detail.js | 56 +++++++--------------------------------- 2 files changed, 10 insertions(+), 53 deletions(-) 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 ? :) } >