Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
379 views
in Technique[技术] by (71.8m points)

小程序跳转怎么传参

小程序列表转到详情页怎么怎么传递一个对象过去,像vue的query和params


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

也是和普通的地址差不多,看下面示例:

A页面跳转B页面:

wx.navigateTo({
  url: 'test?id=1'
})

B页面接收参数:

onLoad: function(option){
    console.log(option);    // { id: 1 }
  }

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...