|
@@ -14,7 +14,7 @@ Page({
|
|
height: app.globalData.height * 2 + 20,
|
|
height: app.globalData.height * 2 + 20,
|
|
},
|
|
},
|
|
messageList: [],
|
|
messageList: [],
|
|
- skip: 0,
|
|
|
|
|
|
+ skip: 1,
|
|
limit: 10,
|
|
limit: 10,
|
|
total: 0,
|
|
total: 0,
|
|
listshow: 1,
|
|
listshow: 1,
|
|
@@ -118,7 +118,8 @@ Page({
|
|
*/
|
|
*/
|
|
onPullDownRefresh: function () {
|
|
onPullDownRefresh: function () {
|
|
wx.showNavigationBarLoading() //在标题栏中显示加载
|
|
wx.showNavigationBarLoading() //在标题栏中显示加载
|
|
- this.data.skip = 0
|
|
|
|
|
|
+ this.data.skip = 1
|
|
|
|
+ this.data.messageList=[]
|
|
this.searchInfo('正在刷新数据')
|
|
this.searchInfo('正在刷新数据')
|
|
},
|
|
},
|
|
/**
|
|
/**
|
|
@@ -127,6 +128,7 @@ Page({
|
|
onReachBottom: function () {
|
|
onReachBottom: function () {
|
|
const pageNum = this.data.skip;
|
|
const pageNum = this.data.skip;
|
|
const _pagenum = Math.ceil(this.data.total / this.data.limit);
|
|
const _pagenum = Math.ceil(this.data.total / this.data.limit);
|
|
|
|
+ console.log(pageNum + "哈哈哈哈" + _pagenum)
|
|
if (pageNum < _pagenum) {
|
|
if (pageNum < _pagenum) {
|
|
this.setData({
|
|
this.setData({
|
|
skip: pageNum + 1 //设置下一页
|
|
skip: pageNum + 1 //设置下一页
|