苹果手机webview分享,option.
webViewUrl链接参数会丢失,不完整(例如:pages/pcweb/pcweb?shareUrl= https://m.sanfu.com/goods/goodsDisplay?goods_sn=296614)【goods/goodsDisplay?goods_sn=296614】参数丢失,安卓手机不会
@那个很帅的小白
/**
* 用户点击右上角分享
*/
onShareAppMessage: function (options) {
let that = this
let return_url = options.webViewUrl
var path = ‘/pages/sharepage/sharepage?shareUrl=’ + encodeURIComponent(return_url)
return {
title: ‘测试分享’,
path: path,
success: function (res) {
that.setData({
web_src: decodeURIComponent(options.webViewUrl)
})
},
fail: function (res) {
// 转发失败
}
}
onLoad: function (options) {
that.setData({
web_src: decodeURIComponent(options.shareUrl)
})
}
ctxPath: 'https://m.sanfu.com/goods/goodsDisplay?goods_sn=296614’为要转发的链接