国产av日韩一区二区三区精品,成人性爱视频在线观看,国产,欧美,日韩,一区,www.成色av久久成人,2222eeee成人天堂

javascript - WeChat jssdk sharing to WeChat click has no effect?
曾經(jīng)蠟筆沒(méi)有小新
曾經(jīng)蠟筆沒(méi)有小新 2017-06-14 10:53:53
0
1
927

Code

share:function(t){
            var _this=this;
            var strUrl = location.href.split('#')[0];
            var img=_this.$(".weixinimg").attr("src");
            var WXDate={
                timestamp:'1497234052', 
                nonceStr:'e40ac141-7338-49e6-b49c-c255041abe6a',
                jsapi_ticket:'',//寫(xiě)死了
                signature:'', //寫(xiě)死了
                url:'http://www.bjiponline.com' 
            };
            wxconifg(WXDate);
            /*$.ajax({
                type: "Post",
                url: "config.aspx/GetKey",
                //方法傳參的寫(xiě)法一定要對(duì),strUrl為形參的名字    
                data: "{'str':'" + strUrl + "'}",
                contentType: "application/json; charset=utf-8",
                dataType: "json",
                success: function (data) {
                    //返回的數(shù)據(jù)用data.d獲取內(nèi)容    
                    $("#wx-share-sign").val(data.d.signature);
                    wxconifg(data.d);
                },
                error: function (err) {
                    alert('55');
                }
            });*/
            function wxconifg(WXDate) {
                wx.config({
                    debug: true,
                    appId: 'wxfb42c31ca406c63f',
                    timestamp: WXDate.timestamp,
                    nonceStr: WXDate.nonceStr,
                    signature: WXDate.signature,
                    jsApiList: ["checkJsApi", "onMenuShareTimeline", "onMenuShareAppMessage"]
                });
                wx.ready(function () {
                    wx.checkJsApi({  
                        jsApiList: [  
                          'getLocation',  
                          'onMenuShareTimeline',  
                          'onMenuShareAppMessage'  
                        ],  
                        success: function (res) { 
                            console.log(res);
                        }  
                      }); 
                    _this.$("#onMenuShareTimeline").click(function(){
                    alert(11)
                    wx.onMenuShareAppMessage({
                            title: t,
                            desc: t,
                            link: WXDate.url,
                            imgUrl: img,
                            trigger: function (res) {
                            },
                            success: function (res) {
                                alert('成功')
                            },
                            cancel: function (res) {
                            },
                            fail: function (res) {
                                alert(JSON.stringify(res));
                            }
                    });
                    });
                    _this.$("#onMenuShareAppMessage").click(function(){
                    //分享到朋友圈
                        wx.onMenuShareTimeline({
                        title: t,
                            desc: t,
                            link: WXDate.url,
                            imgUrl: img,
                            type: 'link',
                            dataUrl: strUrl,
                            trigger: function (res) {
                            },
                            success: function (res) {
                                alert('成功')
                            },
                            cancel: function (res) {
                            },
                            fail: function (res) {
                                alert(JSON.stringify(res));
                            }
                        });
                    });
                    wx.error(function(res){
                    alert('驗(yàn)證失敗')
                    });
              
                    
                });
            } 
        },

I am testing now. So the signatures and other things used are all generated by myself and hard-coded in js, but now they are executed when all my functions are executed, but what is particularly strange is that there is no indication of success or failure, but this ## is displayed in the browser.

#What is the reason for this? Is it because I wrote down everything like my signature?

曾經(jīng)蠟筆沒(méi)有小新
曾經(jīng)蠟筆沒(méi)有小新

reply all(1)
phpcn_u1582

Make it clear that the essence of jssdk is that it only configures information such as titles, descriptions, pictures, etc. for you, rather than doing all the actions for you like a plug-in

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template