下拉刷新
function pulldownRefresh() {
setTimeout(function() {
.......
.......
mui('#pullrefresh').pullRefresh().refresh(true);
mui('#pullrefresh').pullRefresh().endPulldownToRefresh(); //refresh completed
}, 500);
}
上拉加载
function pullupRefresh() {
setTimeout(function() {
.......
mui('#pullrefresh').pullRefresh().endPullupToRefresh((currentPage >= totalPage)); //参数为true代表没有更多数据了。
......
......
}, 1500);
}
1 个回复
2***@qq.com (作者)
已经解决,原因是在下拉刷新中,把重置上拉加载写在了下拉刷新结束代码的上面,这样在ios上就会出问题,安卓上看不出来。
原来的代码在下拉刷新中这样写的:
//重置上拉加载
mui('#pullrefresh').pullRefresh().refresh(true);
//结束下拉刷新
mui('#pullrefresh').pullRefresh().endPulldownToRefresh(); //refresh completed
改为
//结束下拉刷新
mui('#pullrefresh').pullRefresh().endPulldownToRefresh(); //refresh completed
//重置上拉加载
mui('#pullrefresh').pullRefresh().refresh(true);
问题就解决了。