提交 05160e83 编写于 作者: tao.wu's avatar tao.wu

修改微信二次分享

上级 74d16a87
...@@ -115,7 +115,7 @@ export default { ...@@ -115,7 +115,7 @@ export default {
shareUrl: window.location.href, shareUrl: window.location.href,
title1: '云鹊奖活动在即,火速开启提醒', title1: '云鹊奖活动在即,火速开启提醒',
title2: '边学习边获益,最高20万元奖品等你瓜分!', title2: '边学习边获益,最高20万元奖品等你瓜分!',
shareImageUrl: 'https://files.yunqueyi.com/qiniu/image/certifies/2019-11-26-20-4-37-share.png' shareImageUrl: 'https://file.yunqueyi.com/h5/nzhd19/share.png'
} }
this.isWeb = this.$rocNative.isWeb; this.isWeb = this.$rocNative.isWeb;
this.$rocNative.getToken().then(res => { this.$rocNative.getToken().then(res => {
...@@ -139,11 +139,12 @@ export default { ...@@ -139,11 +139,12 @@ export default {
'onMenuShareAppMessage' 'onMenuShareAppMessage'
] ]
},(wx)=>{ },(wx)=>{
const shareUrl = encodeURIComponent(window.location.href);
// 分享给朋友 // 分享给朋友
wx.onMenuShareAppMessage({ wx.onMenuShareAppMessage({
title: this.shareObj.title1, title: this.shareObj.title1,
desc: this.shareObj.title2, desc: this.shareObj.title2,
link: window.location.href, link: shareUrl,
imgUrl: this.shareObj.shareImageUrl, imgUrl: this.shareObj.shareImageUrl,
}); });
...@@ -151,7 +152,7 @@ export default { ...@@ -151,7 +152,7 @@ export default {
wx.onMenuShareTimeline({ wx.onMenuShareTimeline({
title: this.shareObj.title1, title: this.shareObj.title1,
desc: this.shareObj.title2, desc: this.shareObj.title2,
link: window.location.href, link: shareUrl,
imgUrl: this.shareObj.shareImageUrl, imgUrl: this.shareObj.shareImageUrl,
}); });
}) })
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册