开发者社区> 问答> 正文

免登求助PC1003 52013

按照demo修改的,但报错。
代码如下:
DingTalkPC.config({
    agentId:_config.agentId,
    corpId:_config.corpId,
    timeStamp:_config.timeStamp,
    nonceStr:_config.nonceStr,
    signature:_config.signature,
    jsApiList:['device.notification.alert', 'device.notification.confirm']
});
DingTalkPC.ready(function(res){
    DingTalkPC.runtime.permission.requestAuthCode({
        corpId: _config.agentId, //企业ID
        onSuccess: function(result) {
            console.log(result);
            $.ajax({
                url: ctxPath+'userinfo?code=' + info.code + '&corpid='
                + _config.corpId,
                type: 'GET',
                success: function (data, status, xhr) {
                    var info = JSON.parse(data);

                    document.getElementById("userName").innerHTML = info.name;
                    document.getElementById("userId").innerHTML = info.userid;

                    // 图片
                    if (info.avatar.length != 0) {
                        var img = document.getElementById("userImg");
                        img.src = info.avatar;
                        img.height = '100';
                        img.width = '100';
                    }

                },
                error: function (xhr, errorType, error) {
                    logger.e("yinyien:" + _config.corpId);
                    alert(errorType + ', ' + error);
                }
            });
        },
        onFail : function(err) {
            console.log(JSON.stringify(err));
        }

    })
});
但在mac钉钉rc版测试:

调用 config 时发生了错误
VM2072 index.js:180 返回错误对象如下:
VM2072 index.js:180 Object
VM2072 index.js:180 如果以上信息还未能解决你的问题,请访问 bbs.aliyun.com/thread/276.html 发帖咨询
VM2155 index.js:61 {"body":{"errorCode":"PC_1003","errorMessage":"服务端错误码:52013"},"code":500}
求教各位大神指点迷津!

展开
收起
扬扬老爹 2017-08-24 11:38:51 2726 0
0 条回答
写回答
取消 提交回答
问答分类:
问答地址:
问答排行榜
最热
最新

相关电子书

更多
低代码开发师(初级)实战教程 立即下载
冬季实战营第三期:MySQL数据库进阶实战 立即下载
阿里巴巴DevOps 最佳实践手册 立即下载