api.setRefreshHeaderInfo({
loadingImg : 'widget://image/refresh.png',
bgColor : '#ccc',
textColor : '#fff',
textDown : '下拉刷新...',
textUp : '松开刷新...'
}, function(ret, err) {
currentPageNum = 1;
shuaxinxinxi(currentPageNum);
// 恢复下拉
api.refreshHeaderLoadDone()
});
// 上拉加载
api.addEventListener({
name : 'scrolltobottom',
extra : {
threshold : 50 //设置距离底部多少距离时触发,默认值为0,数字类型
}
}, function(ret, err) {
currentPageNum += 1;
shuaxinxinxi(currentPageNum);
api.toast({
msg : '已经到底了'
});
});
loadingImg : 'widget://image/refresh.png',
bgColor : '#ccc',
textColor : '#fff',
textDown : '下拉刷新...',
textUp : '松开刷新...'
}, function(ret, err) {
currentPageNum = 1;
shuaxinxinxi(currentPageNum);
// 恢复下拉
api.refreshHeaderLoadDone()
});
// 上拉加载
api.addEventListener({
name : 'scrolltobottom',
extra : {
threshold : 50 //设置距离底部多少距离时触发,默认值为0,数字类型
}
}, function(ret, err) {
currentPageNum += 1;
shuaxinxinxi(currentPageNum);
api.toast({
msg : '已经到底了'
});
});