html5正在加载数据,上拉加载的时候,“上拉加载更多”,“正在加载...”,“没有更多数据了”。都不显示...

我是根据HolleMUI上面的demo来的(pullrefresh_with_tab.html);我其他的页面可以,就这个页面有问题。是css的问题还是怎么了?

我现在只能用

plus.nativeUI.toast("正在加载...");

plus.nativeUI.toast("暂时没有更多的信息了!");

做控制!

w1.jpg

d1.jpg

x1.jpg

s1.jpg

w1.jpg

d1.jpg

下面是上拉加载js:

//阻尼系数

var deceleration = mui.os.ios?0.003:0.0009;

$('.mui-scroll-wrapper').scroll({

bounce: false,

indicators: false, //是否显示滚动条

deceleration:deceleration

});

$.ready(function() {

//循环初始化所有上拉加载。

$.each(document.querySelectorAll('.tse-slider-group .tse-scroll'),function(index, pullRefreshEl) {

$(pullRefreshEl).pullToRefresh({

up: {

contentrefresh : "正在加载...",//可选,正在加载状态时,上拉加载控件上显示的标题内容

contentnomore:'没有更多数据了',//可选,请求完毕若没有更多数据时显示的提醒内容;

callback: function() {

var self = this;

var ctype = '';

if(pullRefreshEl.getAttribute('title')){

ctype = pullRefreshEl.getAttribute('title');

}else{

ctype = '';

}

setTimeout(function() {

var ul = self.element.querySelector('.mui-table-view');

var length = ul.querySelectorAll('li').length;

var fragment = document.createDocumentFragment();

var li;

var htmlli = '';

mui.ajax({

url:urlCell,

type:'post',

data:{type:ctype,size:'5',offset:length},//{id:id}

dataType:'json',

timeout:10000,//超时时间设置为10秒;

success:function(result){

if(result['backStatus']!='-1'){

mui.each(result,function(index,item){

li = document.createElement('li');

li.className = 'mui-table-view-cell mui-media';

htmlli = ""+

"p><p>if(item%5B

htmlli += item['thumb'];

}else{

htmlli += "../images/default_photo.png";

}

htmlli +="'>";

htmlli += "

"+item['title']+

"

"+item['introduce']+"

"+

"

有效期:"+item['totime']+"

"+

"

主办方:"+item['company']+"

"+

"

";

li.innerHTML = htmlli;

fragment.appendChild(li);

});

ul.appendChild(fragment);

self.endPullUpToRefresh();

plus.nativeUI.toast("正在加载...");

}else{

self.endPullUpToRefresh(true);

plus.nativeUI.toast("暂时没有更多的信息了!");

}

},

error:function(xhr,type,errorThrown){

//异常处理;

console.log(type);

}

});

}, 1000);

}

}

});

});

});

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值