前端扫码代码如下:
或
goto: url,
style: “border:none;background-color:#FFFFFF;width:250px;height:310px”,
width: “250”,
height: “310”
});
var hanndleMessage = function (event) {
var loginTmpCode = event.data; //拿到loginTmpCode后就可以在这里构造跳转链接进行跳转了
window.location.href = “ https://oapi.dingtalk.com/connect/oauth2/sns_authorize?appid=”+globalconfig.App.app_id+”&response_type=code&scope=snsapi_login&state=STATE&redirect_uri=”+redirect_uri+”&loginTmpCode=”+loginTmpCode;
};
if (typeof window.addEventListener != ‘undefined’) {
window.addEventListener(‘message’, hanndleMessage, false);
} else if (typeof window.attachEvent != ‘undefined’) {
window.attachEvent(‘onmessage’, hanndleMessage);
}
前端绑定代码:
发布者:全栈程序员-站长,转载请注明出处:https://javaforall.net/228366.html原文链接:https://javaforall.net
