微信小程序使用wx.reLaunch传参到tabar页面用wx.reLaunch进行跳转 , 地址后跟上想要传递的参数,代码如下:getInfo(){let that = this;wx.request({ur
微信小程序使用wx.reLaunch传参到tabar页面
用wx.reLaunch进行跳转 , 地址后跟上想要传递的参数,代码如下:
getInfo(){let that = this;
wx.request({
url: this.data.baseURL+'/user/info?token='+this.data.token,
success (res) {
that.setData({
info:userinfo
})
wx.setStorage({
data: res.data.data.id,
key: 'id',
})
wx.setStorage({
data: res.data.data.name,
key: 'name',
})
wx.setStorage({
data: res.data.data.avatar,
key: 'avatar',
})
wx.reLaunch({
url:'../user/user?userinfo='+that.data.info
})
}
})
},
--结束END--
本文标题: 小程序如何传参到tabar页面
本文链接: https://www.lsjlt.com/news/116538.html(转载时请注明来源链接)
有问题或投稿请发送至: 邮箱/279061341@qq.com QQ/279061341
下载Word文档到电脑,方便收藏和打印~
2024-05-16
2024-05-16
2024-05-16
2024-05-16
2024-05-16
2024-05-16
2024-05-16
2024-05-16
2024-05-16
2024-05-16
回答
回答
回答
回答
回答
回答
回答
回答
回答
回答
0