Commit 8fa00362 by 高淑倩

add: h5转发分享

parent 5428a8e6
...@@ -88,6 +88,27 @@ wxService.page({ ...@@ -88,6 +88,27 @@ wxService.page({
* 用户点击右上角分享 * 用户点击右上角分享
*/ */
onShareAppMessage: function () { onShareAppMessage: function () {
// 需要 encodeURIComponent path
const { path } = this.data
const enCodeUrl = encodeURIComponent(path)
let sharePath = `/subPackage/page/pages/h5/h5page?url=${enCodeUrl}`
return {
// title: '分享给好友',
path: sharePath,
success(){
wx.showToast({
title: "转发成功",
icon: 'success',
duration: 2000
})
},
fail() {
wx.showToast({
title: "转发失败",
icon: 'none',
duration: 2000
})
}
}
} }
}) })
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment