mirror of
https://github.com/YMFE/yapi.git
synced 2024-12-21 05:19:42 +08:00
fix qsso login need click double and delete project auth bug
This commit is contained in:
parent
cb17d51f54
commit
a0aa06f46a
@ -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>
|
||||
|
||||
)
|
||||
|
@ -32,7 +32,7 @@ class baseController{
|
||||
}
|
||||
|
||||
getUid(ctx){
|
||||
return this.$uid;
|
||||
return parseInt(this.$uid, 10);
|
||||
}
|
||||
|
||||
async checkLogin(ctx){
|
||||
|
@ -86,7 +86,7 @@ var baseController = function () {
|
||||
}, {
|
||||
key: 'getUid',
|
||||
value: function getUid(ctx) {
|
||||
return this.$uid;
|
||||
return parseInt(this.$uid, 10);
|
||||
}
|
||||
}, {
|
||||
key: 'checkLogin',
|
||||
|
Loading…
Reference in New Issue
Block a user