Commit 47c55ff6 by zhangleyuan

feat:处理二维码在企微环境下不展示的问题

parent 306123ce
......@@ -32,15 +32,17 @@ export default function WechatLogin(props: any) {
// console.log(redirect)
// const url = `https://open.weixin.qq.com/connect/oauth2/authorize?appid=ww409ccf9c6e31f19e&redirect_uri=${encodeURIComponent(redirect)}&response_type=code&scope=snsapi_userinfo&state=STATE#wechat_redirect`
// console.log(url)
const qrcodeWrapDom:any = document.querySelector('#qrcode');
let qrnode = new qrcode({
text: redirect,
correctLevel: 2,
size: 160,
image: Logo,
imageSize: 50
});
QRCode.current.innerHTML = ''
QRCode.current.prepend(qrnode);
});
qrcodeWrapDom && qrcodeWrapDom.appendChild(qrnode);
// QRCode.current.innerHTML = ''
// QRCode.current.prepend(qrnode);
setLeftTime(freshTime);
timer.current = setInterval(() => {
if (leftTimeRef.current == 0) {
......@@ -86,9 +88,7 @@ export default function WechatLogin(props: any) {
return <div className='wechatLoginBox'>
<div className="rwm">
<div id="qrcode" ref={(dom) => {
QRCode.current = dom
}}></div>
<div id="qrcode"></div>
{
status === 1 && <div className="error">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment