美文网首页
APICloud刷新和加载

APICloud刷新和加载

作者: 游荡的猫咪 | 来源:发表于2017-07-24 14:27 被阅读0次

刷新:

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刷新和加载

      本文链接:https://www.haomeiwen.com/subject/abdbkxtx.html