wx.config({ debug: false, appId: 'wx27f0c23d1e206315', timestamp: '1743706414', nonceStr: 'KFrQEtKWBBm5C3iz', signature: '2291f5cb75ec3c13907a71de595d8d7fe1dbf176', jsApiList: ['onMenuShareTimeline','updateAppMessageShareData'] }); wx.ready(function () { // 在这里调用 API var share_desc=document.getElementById("description").content; var sLink="http://pjtime.com/2016/6/252728388532.shtml"; //window.location.href.split('?')[0]; //alert("http://pjtime.com/2016/6/252728388532.shtml"); var sTitle=document.title; var sImgURL=document.getElementById("wxshare").getAttribute("data-img"); if( sImgURL==""){sImgURL = "http://www.pjtime.com/img_uparticle/pjtime_share.jpg";} wx.updateAppMessageShareData({ title: sTitle, // 分享标题 desc: share_desc, // 分享描述 link: sLink, // 分享链接,该链接域名或路径必须与当前页面对应的公众号JS安全域名一致 imgUrl: sImgURL, // 分享图标 success: function () { // 设置成功 } }); wx.onMenuShareTimeline({ title: sTitle, // 分享标题 link: sLink, // 分享链接,该链接域名或路径必须与当前页面对应的公众号JS安全域名一致 imgUrl: sImgURL, // 分享图标 success: function () { // 设置成功 } }); });