wxLogin.js 960 B

12345678910111213141516171819202122232425262728293031
  1. !function(a, b, c) {
  2. function d(a) {
  3. var c = "default";
  4. a.self_redirect === !0 ? c = "true" : a.self_redirect === !1
  5. && (c = "false");
  6. var d = b.createElement("iframe"), e = "https://open.weixin.qq.com/connect/qrconnect?appid="
  7. + a.appid
  8. + "&scope="
  9. + a.scope
  10. + "&redirect_uri="
  11. + a.redirect_uri
  12. + "&state="
  13. + a.state
  14. + "&login_type=jssdk&self_redirect="
  15. + c
  16. + '&styletype='
  17. + (a.styletype || '')
  18. + '&sizetype='
  19. + (a.sizetype || '')
  20. + '&bgcolor=' + (a.bgcolor || '') + '&rst=' + (a.rst || '');
  21. e += a.style ? "&style=" + a.style : "", e += a.href ? "&href="
  22. + a.href : "", d.src = e, d.frameBorder = "0",
  23. d.allowTransparency = "true",
  24. d.sandbox = "allow-scripts allow-top-navigation allow-same-origin",
  25. d.scrolling = "no",
  26. d.width = "300px", d.height = "400px";
  27. var f = b.getElementById(a.id);
  28. f.innerHTML = "", f.appendChild(d)
  29. }
  30. a.WxLogin = d
  31. }(window, document);