let query = {url: ''}
wx.navigateTo({
url: `/pages/detail/main?query=` + encodeURIComponent(JSON.stringify(query))
})
复制代码
onLoad(options) {
console.log(JSON.parse(decodeURIComponent(options.query))) //打印时不能带提示
let query = JSON.parse(decodeURIComponent(options.query))
this.url = query.url
}
复制代码