一、普通url页面跳转传值
传:
wx.redirectTo({
url: '/pagesVisit/visitDetails/visitDetails?id=' + res.data.guid + '&type=0' + '&state=1' + '&detail=1'
})
收:
onLoad: function(options) {
console.log(options,"options");
}
二、对象url页面跳转传值
传:
let searchItem = {
start: this.data.newyear + "-" + "0" + this.data.newmonth,
menuId: this.options.data,
visitWork: this.data.visitWork,
shopCode: app.globalData.companyShopCode
};
wx.navigateTo({
url: "/pages/stats/statistics/statsBl?data=" + JSON.stringify(searchItem) + "&title=" + this.data.pageTitle
})
收:
onload:function(options){
let params = options.data;
if (params != '') {
params = JSON.parse(options.data);
}
this.setData({
params: params
})
}