阿里云
服务器地域选择
发表主题 回复主题
  • 157阅读
  • 1回复

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

级别: 新人
发帖
3
云币
10
S=^yJ6 xJ  
从后台请求参数成功, dd.config,dd.erroe  ,dd. ready 全部不执行,  代码放在服务,在钉钉客户端运行,依旧不运行,   ^:K"Tv.=  
O,ZvV3  
Dg/&m*Yl  
<script type="text/javascript" src="https://g.alicdn.com/dingding/open-develop/1.6.9/dingtalk.js"> </script> Xvm.Un< N  
w-R>g dm  
"g\  
sgClient.getDingdingSign(data, function(rs) { kssS,Ogf\_  
                            if (rs && rs.state == 1) { X%xX3e'  
                                alert("请求成功"); m1=3@>  
                                dd.config({ JQ'NFl9<  
                                    agentId: rs.data.agentId, T{bM/?g  
                                    corpId: rs.data.corpId, =L9sb!  
                                    timeStamp: rs.data.timestamp, db:b%1hk:  
                                    nonceStr: rs.data.nonceStr, M~;mamTP  
                                    signature: rs.data.signature, uh%%MhTjv  
                                    jsApiList: [ 1b E$x^P  
                                        'runtime.info', 3'O+  
                                        'biz.contact.choose', ~N;.hU%l  
                                        'device.notification.confirm', Vp\BNq_!s  
                                        'device.notification.alert', |:`f#H  
                                        'device.notification.prompt', @P6K`'.0  
                                        'biz.ding.post', M5HKRLt  
                                        'biz.util.openLink' AYd7qx:~  
                                    ] //必填,需要使用的jsapi列表 P*T 'R  
                                }); Xdsd5 UUM  
                                 dd.error(function(err) { //验证失败   <g5Bt wo%  
                                    alert("进入到error中"); bqN({p&  
                                    document.getElementById("userName").innerHTML = "验证出错"; &4sUi K"  
                                    alert('dd error: ' + JSON.stringify(err)); nZhL  
                                }) {7[^L1  
~ d^+yR-  
                                dd.ready(function() { l.\Fr+*ej  
                                    console.log('dd.ready rocks!') uI@:\Rss  
                                    dd.runtime.info({ NQ !t`  
                                        onSuccess: function(info) { 2[LT!TT  
                                        }, !`hjvJryw  
                                        onFail: function(err) { R8F[ 7&(  
                                        } !m^;Apuy  
                                    }); N?U;G*G  
                                    dd.runtime.permission.requestAuthCode({ ;&37mO/T  
                                        corpId: rs.data.corpId, (]^9>3{|  
                                        onSuccess: function(result) { = \AI92  
                                        }, G$}\~dD  
                                        onFail: function(err) { :"g^y6i  
                                        } Yvs)H'n=  
                                    }); 9xyj,;P>  
Zk"'x,]#  
级别: 新人
发帖
3
云币
10
只看该作者 沙发  发表于: 09-15
Redd.config和dd.error不执行
经过两天的挣扎,终于得出结论,在钉钉上开发移动应用,测试的时候一定要上传服务器,在钉钉内部来执行,同时还要保证你连的网是可以访问钉钉的,要不然ready不会执行!
发表主题 回复主题
« 返回列表上一主题下一主题

限100 字节
如果您提交过一次失败了,可以用”恢复数据”来恢复帖子内容
 
验证问题: ECS是阿里云提供的什么服务? 正确答案:云服务器
上一个 下一个