mpvue小程序开发tips(1)

it2022-05-05  133

wx.setStorageSync('vipId',vipId)-----存储   wx.getStorageSync('vipId')-------读取   wx.navigateTo({ url: `/pages/detail/main?id=${id}` })-------页面之间跳转传递参数   如果需要传递整个对象,如下:   goPage (item) { let obj = JSON.stringify(item) wx.navigateTo({ url: `/pages/detail/main?obj=${obj}` }) }   let { id }= this.$root.$mp.query------取出页面之间跳转时传递的参数   let { obj } = this.$root.$mp.query   this.item = JSON.parse(obj)            

转载于:https://www.cnblogs.com/yfgg/p/10558573.html


最新回复(0)