开发者社区> 问答> 正文

PC端免登.Net实现,调不了JS,急啊!!!

<script type="text/javascript" src="http://g.alicdn.com/dingding/dingtalk-pc-api/2.3.1/index.js" ></script>
//jsapi的配置。
                DingTalkPC.config({
                    appId: _config.appId,
                    corpId: _config.corpId,
                    timeStamp: _config.timeStamp,
                    nonceStr: _config.nonce,
                    signature: _config.signature,
                    jsApiList: ['runtime.info',
                        'biz.contact.choose',
                        'device.notification.confirm',
                        'device.notification.alert',
                        'device.notification.prompt',
                        'biz.ding.post',
                    'runtime.permission.requestAuthCode',
                    'device.geolocation.get',
                    'biz.ding.post',
                    'biz.contact.complexChoose']
                });



                DingTalkPC.ready(function (res) {

                    //获取免登授权码
                    DingTalkPC.runtime.permission.requestAuthCode({
                        corpId: _config.corpId,
                        onSuccess: function (result) {
                            location.href = "ServerApi.aspx?code=" + result["code"];
                        },
                        onFail: function (err) { }

                    });


                    //这里写一个简单的jsapi的弹用,其它api的调用请参照钉钉开发文档-客户端开发文档
                    DingTalkPC.device.notification.alert({
                        message: "测试弹窗",
                        title: "提示",//可传空
                        buttonName: "收到",
                        onSuccess: function () {
                            /*回调*/
                        },
                        onFail: function (err) { }
                    });

                });

DingTalkPC.ready(function (res) 没有执行。

展开
收起
钉钉专业户 2016-08-08 23:49:31 3672 0
3 条回答
写回答
取消 提交回答
  • 回 2楼钉钉-西涣的帖子
    现在也遇到同样的问题,可以请教你吗?

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

    RePC端免登.Net实现,调不了JS,急啊!!!
    发现解决办法,PC端不用放在ready()里面就可以执行了
    2017-11-06 00:16:09
    赞同 展开评论 打赏
  • RePC端免登.Net实现,调不了JS,急啊!!!
    你好,请加我钉钉13711686372,让我来帮你查看下具体原因
    2016-08-09 16:51:54
    赞同 展开评论 打赏
  • 您好,我帮你找相关人来解答
    2016-08-09 16:16:53
    赞同 展开评论 打赏
问答排行榜
最热
最新

相关电子书

更多
JavaScript异步编程 立即下载
Delivering Javascript to World 立即下载
编程语言如何演化-以JS的private为例 立即下载