diff --git a/src/forge/Main/Detail.js b/src/forge/Main/Detail.js index 05927838..2c8e966b 100644 --- a/src/forge/Main/Detail.js +++ b/src/forge/Main/Detail.js @@ -247,6 +247,11 @@ class Detail extends Component{ // fork项目 forkFunc=()=>{ + const { checkIfLogin } = this.props; + if(!checkIfLogin){ + this.props.showLoginDialog(); + return; + } this.setState({ isSpin:true }) @@ -256,10 +261,10 @@ class Detail extends Component{ if (result && result.data.status === 0) { this.props.history.push(`/projects/${result.data.id}/coders`); this.props.showNotification(result.data.message); - this.setState({ - isSpin:false - }) } + this.setState({ + isSpin:false + }) }).catch(error=>{ this.setState({ isSpin:false diff --git a/src/modules/login/LoginDialog.js b/src/modules/login/LoginDialog.js index d09654df..d4dea494 100644 --- a/src/modules/login/LoginDialog.js +++ b/src/modules/login/LoginDialog.js @@ -440,17 +440,9 @@ class LoginDialog extends Component { this.setState({ isRender: false }) - this.props.Modifyloginvalue(); - this.props.history.push("/login"); - - // this.setState({ - // isRender: false - // }) - // try { - // this.props.Modifyloginvalue(); - // }catch (e) { - // - // } + this.props.Modifyloginvalue(); + console.log(this.props); + // this.props.history.push("/login"); } loginEDU=()=>{