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