微信小程序页面传多个参数

在需要页面之间传递多个参数的时候,需要用&链接起来,上一页的正确跳转代码如下:

var that = this;
wx.navigateTo({
url: '../../pages/myListDetail/myListDetail?idx=' + that.data.currentTab + '&parameterId=' + that.data.parameterId+'&888='+888
})
打印目标页面的onLoad函数的事件:
onLoad: function (options) {
console.log(options);
}
 
结果如下:

小程序界面之间经过测试不能传递对象数据。

 

猜你喜欢

转载自www.cnblogs.com/didib/p/9071661.html
今日推荐