小程序點(diǎn)擊tabar刷新此頁(yè)面的方法:
調(diào)用onShow函數(shù)實(shí)現(xiàn)。
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
})
}
})
},