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