以文本方式查看主题

-  Foxtable(狐表)  (http://foxtable.net/bbs/index.asp)
--  专家坐堂  (http://foxtable.net/bbs/list.asp?boardid=2)
----  获取免登码  (http://foxtable.net/bbs/dispbbs.asp?boardid=2&id=172889)

--  作者:fendouww
--  发布时间:2021/11/5 17:29:00
--  获取免登码
钉钉的免登码无法获取,求原因:

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);
  }});
});


--  作者:有点蓝
--  发布时间:2021/11/6 8:52:00
--  
前端alert(info.code)有数据吗?