@aligov/qrcode-login
v1.0.4
Published
浙政钉的二维码登录
Downloads
11
Readme
专有钉二维码登录
Install
tnpm i @aligov/qrcode-login -S
Usage
params
interface IProps {
url: string; // url
height?: number; // iframe高
width?: number; // iframe宽
[key]?: any; // 其余自定义属性
}
demo
import React, { Component } from 'react';
import ReactDOM from 'react-dom';
import QrcodeLogin from '@aligov/qrcode-login';
class App extends Component {
render() {
return (
<div>
<QrcodeLogin
url="https://login-pro.ding.zj.gov.cn/oauth2/auth.htm?response_type=code&client_id=IRS_dingoa&redirect_uri=http://59.202.53.7/irs-console/sso/ding/login?targetUrl=&ali_irs_redirect=http%3A%2F%2Frecept-irs-pre.zj.gov.cn%3A18080%2Fuc%2Foauth2%2Fcallback%3Fguc-accountType%3Dgov%26guc-platform%3Dpc%26guc-endpoint%3DG%26gotoUrl%3Dhttp%3A%2F%2Fop-irs-pre.zj.gov.cn%3A18080%2Fopen%2Fcontrol%2FComponentManagement&scope=get_user_info&authType=QRCODE&embedMode=true"
width={800}
height={800}
/>
</div>
);
}
}
ReactDOM.render((
<App />
), mountNode);