1.0.1 • Published 11 months ago

third-login v1.0.1

Weekly downloads
-
License
ISC
Repository
-
Last release
11 months ago

三方登录

获取微信登录二维码(内嵌式)GetWechatLoginCode

参数说明

  • htmlId(必须):对应页面中需要放二维码的位置, 例
  • appid(必须): 应用唯一标识
  • redirectUri(必须): 重定向地址
  • cssHref(可选): 自定义样式链接

使用

在需要展示微信登录二维码的地方调用该方法即可

import { GetWechatLoginCode } from 'third-login';
const params = {
  htmlId: 'bind-qrcode',
  appid: 'xxxxxxxxxx',
  redirectUri: `${window.location.protocol}//${window.location.host}/third-login-callback?isLogin=true`,
};
GetWechatLoginCode(params);