diff --git a/epdc-resident-mp-yushan/subpages/integralCentre/pages/noticeDetail/noticeDetail.js b/epdc-resident-mp-yushan/subpages/integralCentre/pages/noticeDetail/noticeDetail.js index d7ab000..9cadfab 100644 --- a/epdc-resident-mp-yushan/subpages/integralCentre/pages/noticeDetail/noticeDetail.js +++ b/epdc-resident-mp-yushan/subpages/integralCentre/pages/noticeDetail/noticeDetail.js @@ -8,9 +8,8 @@ Page({ data: { noticeObj: {}, noticeObjContent: "", - pageIndex:1, - pageSize:10, noticeCategory:'', + residentValue:'', // 详情的id preloadVisible: true, nodata: false }, @@ -20,7 +19,8 @@ Page({ */ onLoad: function (options) { this.setData({ - noticeCategory:options.modulecode + noticeCategory:options.modulecode, + residentValue:options.residentValue }) if(options.modulecode == 'notice_points_rule'){ wx.setNavigationBarTitle({ @@ -31,29 +31,7 @@ Page({ title: '积分兑换福利' }) } - this.noticelist() - }, - noticelist () { - let that = this; - let params = { - pageIndex: that.data.pageIndex, - pageSize: that.data.pageSize, - noticeCategory: that.data.noticeCategory - } - api.noticelist(params).then(function (res) { - if (res.data.length == 0) { - that.setData({ - nodata: true - }) - } else { - that.setData({ - nodata: false - }) - that.noticeDetail(res.data[0].id) - } - }).catch(err => { - console.log(err) - }) + this.noticeDetail(this.data.residentValue) }, noticeDetail (noticeId){ let that = this; @@ -63,8 +41,6 @@ Page({ noticeObjContent: util.formatRichText(res.data.noticeContent), preloadVisible: false }) - - console.log(that.data.noticeObj) }).catch(err => { console.log(err) })