//非tabbar页面 var app = getApp(); Page({ data: { number:'' }, onLoad(){ this.data() }, data:function(){ var that=this wx.request({ url: 'https://balabalaa', method: 'POST', data: {}, header: { "Content-Type": " application/json" }, success: function (res) { that.setData({ number:res.data.number }) var Number = that.data.number//传参的值 app.Numberdata=Number//tabbar传递的参数 wx.switchTab({ url: '../tabbar/tabbar', }) } }) } //tabbar页面 var app = getApp(); Page({ onLoad: function (options) { let val = app.Numberdata;//获取参数 console.log(val); } })