刷新:
api.setRefreshHeaderInfo({
visible: true,
bgColor: 'rgba(0,0,0,0)',
textColor: '#666',
textDown: '下拉刷新',
textUp: '釋放刷新'
}, function(ret, err){
loadData(index);
api.refreshHeaderLoadDone();
});
加載:
api.addEventListener({name: 'scrolltobottom',extra:{threshold:30}}, function(ret, err){
api.showProgress({
style: 'default',
animationType: 'fade',
title: '努力加載中...',
text: '先喝杯茶...',
modal: false
});
index++;
setTimeout(function(){loadData(index)},2000);
});