您的位置:宽带测速网 > 网络知识 > 微信小程序delta后如何刷新页面

微信小程序delta后如何刷新页面

2025-06-17 10:27来源:互联网 [ ]

微信小程序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();//调用接口获取数据

}

}