weiwei123
weiwei123
  • 发布:2016-09-18 16:18
  • 更新:2017-07-14 17:49
  • 阅读:1306

上拉加载不执行

分类:MUI

pullupRefresh方法,页面加载完后执行了一次,数据出来了,但是之后页面再往上拉, pullupRefresh这个方法都不执行方法就不执行了,请大神帮我看看问题出在哪了:

 mui.init({//初始化下拉加载  
        pullRefresh: {  
            container: '.item',  
           /* down: {  
                auto: false,  
                callback: goods.pulldownRefresh()  
            },*/  
            up: {  
                auto: true,  
                contentrefresh: '正在加载...',  
                contentnomore:'没有更多数据了',//可选,请求完毕若没有更多数据时显示的提醒内容;  
                callback: goods.pullupRefresh  
            }  
        }  
    });  

"pullupRefresh": function(){  

        setTimeout(function() {  
           //传分类id过去  
            ajax("List2ShopId",{"type":goods.bindClickData.type,"offset":goods.bindClickData.count*(goods.bindClickData.page-1),"limit":goods.bindClickData.page*goods.bindClickData.count},function(data) {  

                if(data.rows.length>0){  
                   //上拉加载的具体业务逻辑  
                    goods.getGoodsList(goods.bindClickData.type);  
                    goods.bindClickData.page++;  
                   // mui('.item').pullRefresh().endPullupToRefresh(data.rows.length>0);  
                } else if(data.rows.length==0){  
                    goods.getGoodsList(type+1);  
                    goods.bindClickData.page=1;  
                    mui('.item').pullRefresh().refresh(data.rows.length==0);  
                    mui('.item').pullRefresh().endPullupToRefresh(data.rows.length=0);  
                }  
            });  
          //  mui('.item').pullRefresh().endPullupToRefresh(true); //参数为true代表没有更多数据了。  
          //  this.endPullupToRefresh(true);//true表示没有更多数据了  

        },1500)  
    },  
2016-09-18 16:18 负责人:无 分享
已邀请:
weiwei123

weiwei123 (作者)

现在执行了,就是用了之后加载出来的li 里的 按钮 。链接什么的,点击没反应了,
,,不知道是什么原因

1***@163.com

1***@163.com

我也遇到上拉不执行的问题,请问一下是怎么解决的?

该问题目前已经被锁定, 无法添加新回复