参数传递
let user={name:'jack',age:21,gender:0,emaile:'12345@qq.com'}
//需要将其转换为字符串才可以通过参数传递
let userStringfy=JSON.stringfy(user)
let userId='123456'
qq.navigateTo({
//如果需要传递多个参数,需要用 & 连接
url:"../userDetail/userDetail?user="+userStringfy+"&userId="+userId,
})
参数接收
onLoad:function(options){
let user=JSON.parse(options.userStringfy)
let userId=options.userId
this.setData({
user:user,
userId:userId
})
}