微信小程序delta后刷新页面的方法:
方法一:this.onLoad(),在delta操作函数中调用this.onLoad()或that.onLoad()
方法二:this.onReady() 或者 this.onShow()。在delta操作函数中调用this.onReady()函数。
方法三:定义标志,例如:
onShow: function(){if (app.globalData.Flag) {
app.globalData.Flag = false;
this.getData();//调用接口获取数据
}
}
亿速云「云服务器」,即开即用、新一代英特尔至强铂金CPU、三副本存储NVMe SSD云盘,价格低至29元/月。点击查看>>
推荐阅读:微信小程序怎么动态更新页面