wx.config({ debug: false, appId: 'wx5888c314d26f81c3', // 必填,公众号的唯一标识 timestamp: 1729088477, // 必填,生成签名的时间戳 nonceStr: '8UrcUKjRRpg3JWQ4', // 必填,生成签名的随机串 signature: 'e20555597a10f2d94aaaddc805b1a3decabb09cd',// 必填,签名 jsApiList: ["updateTimelineShareData","updateAppMessageShareData"] // 必填,需要使用的JS接口列表 }); wx.ready(function(){ wx.updateTimelineShareData({ title: window.document.title, // 分享标题 link: window.document.location.href, // 分享链接,该链接域名或路径必须与当前页面对应的公众号JS安全域名一致 imgUrl: 'https://criaoss.cria.org.cn/res/cria.jpg', // 分享图标 success: function () { // alert('updateTimelineShareData'); } }); wx.updateAppMessageShareData({ title: window.document.title, // 分享标题 desc: window.document.title, // 分享描述 link: window.document.location.href, // 分享链接,该链接域名或路径必须与当前页面对应的公众号JS安全域名一致 imgUrl: 'https://criaoss.cria.org.cn/res/cria.jpg', // 分享图标 success: function () { // 设置成功 // alert('updateAppMessageShareData'); } }); });