From cd14ee1e9af1eaabb5f7eb0df14f6a6f69da7d9f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BB=84=E5=BF=83=E5=AE=87?= Date: Fri, 31 May 2024 16:46:58 +0800 Subject: [PATCH] =?UTF-8?q?=E5=90=8C=E6=AD=A5test?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/forge/Main/Detail.js | 20 +++++++------------- 1 file changed, 7 insertions(+), 13 deletions(-) diff --git a/src/forge/Main/Detail.js b/src/forge/Main/Detail.js index 77ced1348..3d9af68be 100644 --- a/src/forge/Main/Detail.js +++ b/src/forge/Main/Detail.js @@ -270,17 +270,10 @@ class Detail extends Component { console.log("--------start channel --------"); // 是镜像项目,且未完成迁移 this.canvasChannel(); - if (num) { - this.setState({ - secondSync: true, - firstSync: false - }) - } else { - this.setState({ - firstSync: true, - secondSync: false - }) - } + this.setState({ + firstSync: true, + secondSync: false + }) this.setState({ mirror_status:1 }) @@ -334,7 +327,7 @@ class Detail extends Component { disconnected: () => { console.log("###### cannot connected! ######"); }, - received: data => { + received: async data => { console.log(`###### ---received data--- ######`); if (data) { if (deleteFlag) { @@ -344,7 +337,8 @@ class Detail extends Component { if (data.project && data.project.mirror_status === 2) { this.deleteProjectBack(); } - this.getDetail(); + const projectdata = await getProjectDetailFunc(owner, projectsId, !window.location.host).data; + this.getDetail(projectdata) this.getBanner(); } this.setState({