onShareAppMessage (options) {
let url= options.webViewUrl;
return {
path: '/pages/homePage/login?url=' + encodeURIComponent(url),
success: function (res) {
},
fail: function (res) {
}
};
},
从文档中得知,web-view分享后回得到options.webViewUrl(跳转地址),因为通常是跳h5地址,会有完整域名,如果此时跳登录页面进行地址传值需要进行编码 encodeURICompon(url),
等回到次页面进行解码就行:
onLoad(option) {
if (option.url) {
this.webUrl = decodeURIComponent(option.url);
}
},