收藏
回答

H5页面分享到群,提示操作过于频繁

操作方式:

微信内直接打开H5页面:http://man.39.net/slbp/share.html

右上角->分享给朋友,然后选择群。

则出现以下提示:操作过于频繁,可稍候再试。


页面代码如下:

var api39_wx = function(config) {
            if (navigator.userAgent.match(/MicroMessenger/i)) {
                $.ajax({
                    tyep: "get",
                    url: "http://xxxxxxxxxx/GetConfigParameter",
                    dataType: "jsonp",
                    jsonp: "jsoncallback",
                    data: {
                        urlback: encodeURIComponent(location.href.split("#")[0])
                    },
                    success: function(data) {
                        wx.config({
                            debug: false,
                            appId: data.strappid,
                            timestamp: data.strtimestamp,
                            nonceStr: data.strnoncestr,
                            signature: data.strsignature,
                            jsApiList: ["onMenuShareTimeline", "onMenuShareAppMessage", "onMenuShareQQ", "onMenuShareQZone"]
                        });
                        wx.ready(function() {
                            if(wx.onMenuShareAppMessage) {
                                wx.onMenuShareAppMessage(config);
                                wx.onMenuShareQQ(config);
                            }
                            else {
                                wx.updateTimelineShareData(config,function(res){
                                });
                            }
                            if(wx.onMenuShareTimeline) {
                                wx.onMenuShareTimeline(config);
                                wx.onMenuShareQZone(config);
                            }
                            else {
                                wx.updateAppMessageShareData(config,function(res){
                                });
                            }
                        });
                    }
                })
            }
        };
        var wxinfo = new api39_wx({
            title: '自定义分享标题出来了',
            desc: '这里是自定义分享的摘要',
            link: location.href,
            imgUrl: 'http://nimage.39.net/wap/m/images/pic/for_weixin.jpg',
        });

如果去掉这段代码,则可以分享到群,但分享标题、链接、缩略图均为微信自动获取。

回答关注问题邀请回答
收藏

2 个回答

  • a0🌝Sweet-KK
    a0🌝Sweet-KK
    01-02

    同样的jsonp获取签名 但是在真机上jsonp回调不管是成功还是失败都不执行,一脸懵逼,开发者工具是正常的

    01-02
    赞同
    回复
  • 许诺
    许诺
    2019-05-22

    请问找到问题了吗


    2019-05-22
    赞同
    回复
登录 后发表内容