mirror of
https://github.com/YMFE/yapi.git
synced 2025-01-06 12:45:22 +08:00
17 lines
391 B
JavaScript
17 lines
391 B
JavaScript
|
import React from 'react';
|
||
|
const Qsso = require('./qsso-lib');
|
||
|
|
||
|
class QssoComponent extends React.Component{
|
||
|
componentDidMount(){
|
||
|
Qsso.attach('qsso-login', '/api/user/login_by_token');
|
||
|
}
|
||
|
render(){
|
||
|
return <button id="qsso-login" className="btn-home btn-home-normal" >QSSO 登录</button>;
|
||
|
}
|
||
|
}
|
||
|
|
||
|
module.exports = function(){
|
||
|
this.bindHook('third_login', QssoComponent);
|
||
|
};
|
||
|
|