j***@fchtech.com
j***@fchtech.com
  • 发布:2016-10-08 13:45
  • 更新:2016-10-18 07:26
  • 阅读:914

云端打包后pullrefresh不起作用

分类:HBuilder
var subpages = [{  
    url: 'pullrefresh_trans_manage.html',  
    id: 'pullrefresh_trans_manage.html',  
    styles: {  
        top: '120px',  
        bottom: '0px',  
    }  
}];  
var contentWebview = plus.webview.create(subpages[0].url, subpages[0].id, subpages[0].styles);  
plus.webview.currentWebview().append(contentWebview);  
contentWebview.evalJS("mui('#pullrefresh').pullRefresh().scrollTo(0,0,100)");  

//'pullrefresh_trans_manage.html就是初始化pullrefresh  
if(mui) {  
    mui.plusReady(function() {  
        setTimeout(function() {  
            mui('#pullrefresh').pullRefresh().pullupLoading();  
        }, 1000);  

    });  
} else {  
    mui.ready(function() {  
        mui('#pullrefresh').pullRefresh().pullupLoading();  
    });  
}

用HBuilder真机运行可以刷新数据,可是用云端打包之后,pullrefresh根本不起作用,没有看到任何刷新动作,真是醉了。云端打包有何讲究??
HBulider真机运行效果


云端打包后运行效果

2016-10-08 13:45 负责人:无 分享
已邀请:
j***@fchtech.com

j***@fchtech.com (作者)

头疼了,修改了初始代码

mui.plusReady(function() {  
                if(mui.os.android) {  
                    setTimeout(function() {  
                        mui('#pullrefresh').pullRefresh().pullupLoading();  
                    }, 1000);  
                } else {  
                    mui('#pullrefresh').pullRefresh().pullupLoading();  
                }  

            });

在Android5.1下面正常运行了,但是在Android4.4.2下就是不主动刷新。
HBuilder直接运行没问题,打包了后就没法工作。云端打包怎么处理的,没说法么?

BoredApe

BoredApe - 有问题就会有答案。

请上传完整能重新问题的测试工程

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