微信小程序页面跳转传参

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

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);

}

结果如下:

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

猜你喜欢

转载自blog.csdn.net/weixin_42220533/article/details/84385916