PHP - 钉钉 - 扫码 - 获取信息
2017-06-30 •
13 条评论
引入 js
<script type="text/javascript" src="//g.alicdn.com/dingding/open-develop/0.8.4/dingtalk.js"></script>
内部代码如下,作用是实现二维码的展现。
<script>
!function (window, document) {
function d(a) {
var e, c = document.createElement("iframe"),
d = "https://login.dingtalk.com/login/qrcode.htm?goto=" + a.goto ;
//console.log(d);
d += a.style ? "&style=" + encodeURIComponent(a.style) : "",
d += a.href ? "&href=" + a.href : "",
c.src = d,
c.frameBorder = "0",
c.allowTransparency = "true",
c.scrolling = "no",
c.width = a.width ? a.width + 'px' : "365px",
c.height = a.height ? a.height + 'px' : "400px",
e = document.getElementById(a.id),
e.innerHTML = "",
e.appendChild(c)
}
window.DDLogin = d
}(window, document);
</script>