fix qsso login need click double and delete project auth bug

This commit is contained in:
suxiaoxin 2017-07-25 10:22:45 +08:00
parent cb17d51f54
commit a0aa06f46a
3 changed files with 8 additions and 3 deletions

View File

@ -53,6 +53,11 @@ class Login extends Component {
});
}
componentDidMount() {
window.QSSO.attach('qsso-login','/user/login_by_token')
}
render() {
const { getFieldDecorator } = this.props.form;
return (
@ -81,7 +86,7 @@ class Login extends Component {
<FormItem style={formItemStyle}>
<Button style={changeHeight} type="primary" htmlType="submit" className="login-form-button">登录</Button>
</FormItem>
<Button style={changeHeight} id="qsso-login" type="primary" className="login-form-button" size="large" onClick={() => window.QSSO.attach('qsso-login','/user/login_by_token')} ghost>QSSO登录</Button>
<Button style={changeHeight} id="qsso-login" type="primary" className="login-form-button" size="large" ghost>QSSO登录</Button>
</Form>
)

View File

@ -32,7 +32,7 @@ class baseController{
}
getUid(ctx){
return this.$uid;
return parseInt(this.$uid, 10);
}
async checkLogin(ctx){

View File

@ -86,7 +86,7 @@ var baseController = function () {
}, {
key: 'getUid',
value: function getUid(ctx) {
return this.$uid;
return parseInt(this.$uid, 10);
}
}, {
key: 'checkLogin',