wx.config({ debug: false, appId: 'wx27f0c23d1e206315', timestamp: '1743809915', nonceStr: 'upcApeuGmm6QmN2j', signature: '2d011c6550c3b7a066a83002a3bc6c5e50866d2a', jsApiList: ['onMenuShareTimeline','updateAppMessageShareData'] }); wx.ready(function () { // 在这里调用 API var share_desc=document.getElementById("description").content; var sLink="http://m.pjtime.com/2011/4/m13238134.shtml"; //window.location.href.split('?')[0]; //alert("http://m.pjtime.com/2011/4/m13238134.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 () { // 设置成功 } }); });