企业微信扫码登录后台管理系统,如何修改二维码样式

href字段为转码成base64格式的css文件 ,企业微信会把这个样式添加到iframe中


import { Base64 } from 'js-base64'




      new WwLogin({
        id: 'm-wx-qrcode',
        appid: appId,
        agentid: agentId,
        redirect_uri: encodeURIComponent(redirectUri),
        state: 'wechat_login',
        href: `data:text/css;base64,${Base64.encode(
          `.impowerBox .qrcode {width: 200px;}`
        )}`,
      })

 

 

 参考链接:

https://blog.csdn.net/Kiruthika/article/details/123828143

https://base64.us/

https://developers.weixin.qq.com/doc/oplatform/Website_App/WeChat_Login/Wechat_Login.html

https://developer.work.weixin.qq.com/tutorial/scan-login/4

posted @ 2022-04-22 17:24  徐同保  阅读(12)  评论(0编辑  收藏  举报  来源