// 下拉刷新页面
onPullDownRefresh: function(event) {
var refreshUrl = this.data.dataUrl + '?start=0&count=20';
wx.showNavigationBarLoading();
this.data.movies = [];
this.data.isEmpty = true;
this.data.totalCount = 20;
util.http(refreshUrl,this.processDoubarData);
},
data: {
totalCount: 20,
dataUrl: '',
movies:[],
isEmpty: true
},
onReachBottom: function(event) {
wx.showNavigationBarLoading();
var nextUrl = this.data.dataUrl + '?start='+this.data.totalCount + '&count=8';
console.log(nextUrl);
util.http(nextUrl,this.processDoubarData);
this.data.totalCount += 8;
}this.data.totalCount = 20; 这个应该是20吧,不应该为0,
this.data.totalCount += 8; 这句话应该放在加载更多的时候执行