diff --git a/packageG/pages/user/my_service/cosmetology_list.js b/packageG/pages/user/my_service/cosmetology_list.js index 5d71119..900a7c1 100644 --- a/packageG/pages/user/my_service/cosmetology_list.js +++ b/packageG/pages/user/my_service/cosmetology_list.js @@ -22,13 +22,13 @@ Page({ projectId:"",//项目id }, onReachBottom: function() { - var th = this; - if (this.data.total <= th.data.pageSize) return; - if (this.data.ismore) return; - wx.showLoading({ - title: '加载中...', - }) - th.query_cology(); + // var th = this; + // if (this.data.total <= th.data.pageSize) return; + // if (this.data.ismore) return; + // wx.showLoading({ + // title: '加载中...', + // }) + // th.query_cology(); }, query_cology: function() { var th = this; @@ -42,27 +42,31 @@ Page({ serviceId: itemId, storageId: storageId, page: th.data.curpage, - pageSize: th.data.pageSize + pageSize: 100 } }).then(res => { wx.hideLoading(); if (res.data.code == 0) { - th.data.curpage++; + // th.data.curpage++; var arr1 = th.data.cosmetology_list; var arr2 = res.data.data; var arr3 = [...arr1, ...arr2]; - - th.setData({ cosmetology_list: arr3, total: res.data.data.total, is_service_read: 1, is_cosmetology_read:1 }), wx.stopPullDownRefresh(); //停止下拉刷新 + if (arr2.length < th.data.pageSize) { + th.setData({ + is_cosmetology_read:1, + ismore:1 + }) + } } else { th.setData({ is_cosmetology_read:1, - ismore:1 + ismore:1 }) } })