小程序点击tabar刷新此页面的方法:
调用onShow函数实现。
onShow:function(){varthat=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
})
}
})
},
本文来源:https://www.yuntue.com/post/71310.html | 云服务器网,转载请注明出处!

微信扫一扫打赏
支付宝扫一扫打赏