阿里云
云栖社区2017年度颁奖盛典
发表主题 回复主题
  • 324阅读
  • 1回复

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

级别: 新人
发帖
3
云币
10
Zjg\jo  
从后台请求参数成功, dd.config,dd.erroe  ,dd. ready 全部不执行,  代码放在服务,在钉钉客户端运行,依旧不运行,   "!tw ,Gp  
'c&@~O;^d  
(0W}e(D8  
<script type="text/javascript" src="https://g.alicdn.com/dingding/open-develop/1.6.9/dingtalk.js"> </script> y.p6%E_`  
L\NZDkd  
lGUV(D  
sgClient.getDingdingSign(data, function(rs) { d&uTiH?0  
                            if (rs && rs.state == 1) { mE`qvavP|/  
                                alert("请求成功"); ex \W]5  
                                dd.config({ T[-c|  
                                    agentId: rs.data.agentId, 8e!DDh  
                                    corpId: rs.data.corpId, ~AanU1U<  
                                    timeStamp: rs.data.timestamp, \bm6/fhA:  
                                    nonceStr: rs.data.nonceStr, EWIc|b:  
                                    signature: rs.data.signature, =nx:GT3&[  
                                    jsApiList: [  }m%?&c  
                                        'runtime.info', XcMJD(!  
                                        'biz.contact.choose', ,|X+/|gm  
                                        'device.notification.confirm', >:E* 7  
                                        'device.notification.alert', QZ3(u<f  
                                        'device.notification.prompt', +'/}[1q1/T  
                                        'biz.ding.post', 0^_lj9B!  
                                        'biz.util.openLink' ^ Wfgwmh  
                                    ] //必填,需要使用的jsapi列表 2l@"p!ar=  
                                }); 7sc<dM  
                                 dd.error(function(err) { //验证失败   1@^Ek8C  
                                    alert("进入到error中"); }l( m5  
                                    document.getElementById("userName").innerHTML = "验证出错"; ouVjZF@kS  
                                    alert('dd error: ' + JSON.stringify(err)); HCG@#W<wc  
                                }) q|o |/O-{  
{kPe#n>xT  
                                dd.ready(function() { K- I\P6R`  
                                    console.log('dd.ready rocks!') LuP?$~z  
                                    dd.runtime.info({ 0<@KDlF  
                                        onSuccess: function(info) { QW~5+c9JJ  
                                        }, n2d8;B#  
                                        onFail: function(err) { sQ}%7BMK  
                                        } ZSPgci  
                                    }); ^'&iYV  
                                    dd.runtime.permission.requestAuthCode({ )W]>\=@Y  
                                        corpId: rs.data.corpId, v0`qMBr1y  
                                        onSuccess: function(result) { =1*%>K  
                                        }, - LiPHHX<  
                                        onFail: function(err) { 4e@&QOo`Cu  
                                        } 1a&/Zlr  
                                    }); kxm:g)`=[  
@1v3-n=  
级别: 新人
发帖
3
云币
10
只看该作者 沙发  发表于: 09-15
Redd.config和dd.error不执行
经过两天的挣扎,终于得出结论,在钉钉上开发移动应用,测试的时候一定要上传服务器,在钉钉内部来执行,同时还要保证你连的网是可以访问钉钉的,要不然ready不会执行!
发表主题 回复主题
« 返回列表上一主题下一主题

限100 字节
如果您在写长篇帖子又不马上发表,建议存为草稿
 
验证问题: ECS是阿里云提供的什么服务? 正确答案:云服务器
上一个 下一个