// 分享 onShareAppMessage(res) { let eurl = '/pages/comment/comment?forumId=' + this.forumId + '&from=share'; if (res.from === 'button') { // 来自页面内分享按钮 console.log(res.target) } return { title: this.forumInfo.shareConten, // 分享标题 path: eurl, // 分享路径,可以是当前页面的路径 imageUrl: this.forumInfo.shareUrl // 分享图标,可选 }; }, onShareTimeline(res) { let eurl = '/pages/comment/comment?forumId=' + this.forumId + '&from=share'; if (res.from === 'button') { // 来自页面内分享按钮 console.log(res.target) } return { title: this.forumInfo.shareConten, // 分享到朋友圈的标题 query: eurl, imageUrl: this.forumInfo.shareUrl, // 分享图标,可选 }; },能分享,但是在朋友圈打开无法正常请求到接口数据
onShareTimeline 分享朋友圈参数没了?如下所示,分享朋友圈,path我看好像不用配置,直接写 url=值 但是也不起作用 onShareTimeline(res) { return { title: '高清壁纸', path: '/subPackages/tools/wallpaperShare/index', query: 'url=' + this.parsingData.url, success: function(res) { // 分享成功的回调函数 console.log('分享成功', res); }, fail: function(res) { // 分享失败的回调函数 console.log('分享失败', res); } } },
05-11