.json
"enablePullDownRefresh": true, //开启下拉
"backgroundColor": "#F00", //下拉背景颜色
"backgroundTextStyle": "dark" //加载中loading颜色
//下拉刷新
onPullDownRefresh:function(){
wx.showNavigationBarLoading() //在标题栏中显示加载
//模拟加载
//用计时器是为了让顶部loading更明显一点,当然也可不用
setTimeout(function(){
//调用接口
},1500);
}
//接口内获取刷新完成后停止
wx.hideNavigationBarLoading() //完成停止加载
wx.stopPullDownRefresh() //停止下拉刷新