阿里云
社区时光机
发表主题 回复主题
  • 531阅读
  • 1回复

[技术开发]dd.config和dd.error不执行

级别: 新人
发帖
3
云币
10
}(UU~V  
从后台请求参数成功, dd.config,dd.erroe  ,dd. ready 全部不执行,  代码放在服务,在钉钉客户端运行,依旧不运行,   V*+Z=Y'  
@ ojV8  
8{%[|Ye  
<script type="text/javascript" src="https://g.alicdn.com/dingding/open-develop/1.6.9/dingtalk.js"> </script> 0e~4(2xK  
3AC/;WB9  
m@` NN  
sgClient.getDingdingSign(data, function(rs) { $@ZrGT  
                            if (rs && rs.state == 1) { ,6T3:qkkvF  
                                alert("请求成功"); 8|S}!P"  
                                dd.config({ yex0rnQ|  
                                    agentId: rs.data.agentId, R`>z>!)  
                                    corpId: rs.data.corpId, idP2G|Z  
                                    timeStamp: rs.data.timestamp, $tca: b}Mk  
                                    nonceStr: rs.data.nonceStr, iJEKLv  
                                    signature: rs.data.signature, /-C6I:  
                                    jsApiList: [ ,=t}|!jx  
                                        'runtime.info', @]:GTrs  
                                        'biz.contact.choose', #s]`jdc  
                                        'device.notification.confirm', CW;=q[+w  
                                        'device.notification.alert', %D<>F&h  
                                        'device.notification.prompt', 2mPU /  
                                        'biz.ding.post', 6n Hyd<o  
                                        'biz.util.openLink' UZ 6:vmcT  
                                    ] //必填,需要使用的jsapi列表 ]=T-C v=t  
                                }); 8al%F_r]  
                                 dd.error(function(err) { //验证失败    C\5"Kb  
                                    alert("进入到error中"); r2xIbZ  
                                    document.getElementById("userName").innerHTML = "验证出错"; \6c8Lqa  
                                    alert('dd error: ' + JSON.stringify(err)); x`gsD3C  
                                }) tFYo d#  
85]3y%f9  
                                dd.ready(function() { )_Wo6l)i  
                                    console.log('dd.ready rocks!') 4lpkq  
                                    dd.runtime.info({ ,e5#wz  
                                        onSuccess: function(info) { dhmZ3~cW>  
                                        }, 4 .d~u@=  
                                        onFail: function(err) { vSG$ 2g=  
                                        } +*ZF52hy|  
                                    }); Jde@T h  
                                    dd.runtime.permission.requestAuthCode({ `oGL==  
                                        corpId: rs.data.corpId, 7C@%1kL  
                                        onSuccess: function(result) { iF'qaqHWY4  
                                        }, M7g6m  
                                        onFail: function(err) { Sk|DVV $  
                                        } &3%V%_  
                                    }); rq_0"A  
S[5e,E w  
级别: 新人
发帖
3
云币
10
只看该作者 沙发  发表于: 2017-09-15
Redd.config和dd.error不执行
经过两天的挣扎,终于得出结论,在钉钉上开发移动应用,测试的时候一定要上传服务器,在钉钉内部来执行,同时还要保证你连的网是可以访问钉钉的,要不然ready不会执行!
发表主题 回复主题
« 返回列表上一主题下一主题

限100 字节
如果您在写长篇帖子又不马上发表,建议存为草稿
 
验证问题: 阿里云官网域名是什么? 正确答案:www.aliyun.com
上一个 下一个