APICloud刷新和加载

刷新:

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);        
      }); 

你可能感兴趣的:(APICloud刷新和加载)