钉钉的免登码无法获取,求原因:HttpRequest 代码:
Dim wb As New WeUI
Dim sb As New StringBuilder
wb.AppendHTML("<script src='https://g.alicdn.com/dingding/dingtalk-jsapi/2.10.3/dingtalk.open.js'></script>") '引入脚本文件
wb.AppendHTML("<script src='./lib/getCode.js'></script>") '''免密登录
Select Case e.Path
Case "wsjc.htm"
MessageBox.Show(e.PlainText)
获取始终为空白信息
js:
getCode(function() {
dd.runtime.permission.requestAuthCode({
corpId: "xxxxx", // 企业id
onSuccess: function (info) {
var code = info.code ; // 通过该免登授权码可以获取用户身份
// alert(info.code);
//window.location.href="wsjc.htm?dcode=" + code ;
sendAjaxText(code,"wsjc.htm","",false);
}});
});