wx.config({ debug: false, appId: 'wx5888c314d26f81c3', // 必填,公众号的唯一标识 timestamp: 1795352924, // 必填,生成签名的时间戳 nonceStr: 'eUOIrQ2xV5kPw15d', // 必填,生成签名的随机串 signature: '9bafc4055dbe67ed56a2316bd12824dada5fbffe',// 必填,签名 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'); } }); });