开发者社区 问答 正文

安卓版本的钉钉崩溃

我开发一个微应用,然后在里面调用钉钉的DING接口。然后钉钉就崩溃了。是JSAPI的,具体接口为 dd.biz.ding.post({users : [ '100' , '101' ], //用户列表,工号 corpId: '' , //企业id type: 2 , //钉类型 1:image  2:link alertType: 2 ,alertDate: { "format" : "yyyy-MM-dd HH:mm" , "value" : "2015-05-09 08:00" },attachment: {title: '' ,url: '' ,image: '' ,text: '' }text: '' , //消息 onSuccess : function() {},onFail : function() {}})。苹果机没事哦

展开
收起
万亮宝宝 2016-06-14 16:50:41 5098 分享 版权
3 条回答
写回答
取消 提交回答
  • 回 2楼君信的帖子
            dd.config({
                agentId: _config.agentId,
                corpId: _config.corpId,
                timeStamp: _config.timeStamp,
                nonceStr: _config.nonceStr,
                signature: _config.signature,
                jsApiList: [
                    'biz.ding.post'
                ]
            });
            dd.error(function (err) {
    //            alert(JSON.stringify(err));
                setTimeout("window.location.reload()",500);
    //            alert("无法获取用户ID,请重新刷新页面");
            });
            dd.ready(function(){
                //发钉
    //            alert('ready');
                $(".dinglink").on('click', function () {
    //                alert($(this)[0].name);
                    dd.biz.ding.post({
                        users : [$(this)[0].name],//用户列表,工号
                        corpId:_config.corpId, //企业id
                        type: 1, //钉类型 1:image  2:link
                        alertType: 1,
                        alertDate: {"format":"yyyy-MM-dd HH:mm","value":"2015-05-09 08:00"},
                        attachment: {
    //                        title: '', //附件的标题
    //                        url: '', //附件点击后跳转url
                            image: '', //附件显示时的图片 【可选】
    //                        text: '' //附件显示时的消息体 【可选】
                        },
                        text: '提交今天的文章', //消息体
                        onSuccess : function() {
    //                        alert('测试成功');
                        },
                        onFail : function(err) {
                            alert('安卓暂不启用此功能,请到PC端进行钉');
                        }
                    })
                });
            });
    详细代码

    -------------------------

    回 2楼君信的帖子
    type为2,type为1就经常失败

    -------------------------

    Re安卓版本的钉钉崩溃
    不是钉钉崩溃,是微应用直接退出来了。
    2016-06-17 18:38:50
    赞同 展开评论
  • 您好,我尝试用您的代码进行调用,未曾复现崩溃。麻烦贴出详细的代码可以吗
    2016-06-15 10:34:04
    赞同 展开评论
  • 谢谢反馈 我们查一下
    2016-06-14 20:43:22
    赞同 展开评论