小程序点击tabar刷新此页面的方法:
调用onShow函数实现。
onShow: function(){var that =this;
wx.request({
url: app.globalData.web_url+'yourApi?open_id='+ wx.getStorageSync('open_id'),
success: function(res){
that.setData({
cartList: res.data.cartList,
cartSize: res.data.cartSize,
totalAmount: res.data.totalAmount
})
}
})
},
亿速云「云服务器」,即开即用、新一代英特尔至强铂金CPU、三副本存储NVMe SSD云盘,价格低至29元/月。点击查看>>
推荐阅读:小程序如何传参到tabar页面