From 3914be4b0a6242f20e5bec2add8d0a90b91d2ad8 Mon Sep 17 00:00:00 2001 From: zhaoyongnian <541231643@qq.com> Date: Fri, 5 Jun 2020 09:58:18 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- subpages/home/pages/noticeNew/noticeNew.js | 23 +++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) diff --git a/subpages/home/pages/noticeNew/noticeNew.js b/subpages/home/pages/noticeNew/noticeNew.js index 2308345..a0bb103 100644 --- a/subpages/home/pages/noticeNew/noticeNew.js +++ b/subpages/home/pages/noticeNew/noticeNew.js @@ -25,6 +25,12 @@ Page({ // 加载网格长管辖的网格列表 noticelist() { let that = this + + if(that.data.noticeCategory =='notice_navigation_hot'){ + that.setData({ + pageIndex:1 + }) + } let params = { pageIndex: that.data.pageIndex, pageSize: that.data.pageSize, @@ -118,15 +124,18 @@ Page({ * 页面上拉触底事件的处理函数 */ onReachBottom: function () { - this.setData({ - loadMoreVisible: true - }) - if (this.data.loadMoreType === 'loading') { + console.log(this.data.noticeCategory) + if(this.data.noticeCategory !='notice_navigation_hot'){ this.setData({ - pageIndex: this.data.pageIndex + 1, - pageSize: this.data.pageSize, + loadMoreVisible: true }) - this.noticelist(); + if (this.data.loadMoreType === 'loading') { + this.setData({ + pageIndex: this.data.pageIndex + 1, + pageSize: this.data.pageSize, + }) + this.noticelist(); + } } },