|
|
@ -8,28 +8,51 @@ Page({ |
|
|
|
*/ |
|
|
|
data: { |
|
|
|
noticeObj: {}, |
|
|
|
noticeObjContent: '' |
|
|
|
noticeObjContent: '', |
|
|
|
pageIndex:1, |
|
|
|
pageSize:10, |
|
|
|
noticeCategory:'' |
|
|
|
}, |
|
|
|
|
|
|
|
/** |
|
|
|
* 生命周期函数--监听页面加载 |
|
|
|
*/ |
|
|
|
onLoad: function (options) { |
|
|
|
this.setData({ |
|
|
|
noticeCategory:options.modulecode |
|
|
|
}) |
|
|
|
if (options.modulecode == 'notice_taste'){//味道
|
|
|
|
wx.setNavigationBarTitle({ |
|
|
|
title: '锦水味道' |
|
|
|
}) |
|
|
|
this.noticelist() |
|
|
|
} else if(options.modulecode == 'notice_impression'){ |
|
|
|
wx.setNavigationBarTitle({ |
|
|
|
title: '锦水印象' |
|
|
|
}) |
|
|
|
this.noticelist() |
|
|
|
} else if(options.modulecode == 'notice_warning'){ |
|
|
|
wx.setNavigationBarTitle({ |
|
|
|
title: '锦水警事' |
|
|
|
}) |
|
|
|
this.browseNotice(options.id) |
|
|
|
this.noticeDetail(options.id) |
|
|
|
} |
|
|
|
}, |
|
|
|
|
|
|
|
noticelist() { |
|
|
|
let that = this; |
|
|
|
let params = { |
|
|
|
pageIndex: that.data.pageIndex, |
|
|
|
pageSize: that.data.pageSize, |
|
|
|
noticeCategory: that.data.noticeCategory |
|
|
|
} |
|
|
|
this.browseNotice(options.id) |
|
|
|
this.noticeDetail(options.id) |
|
|
|
api.noticelist(params).then(function (res) { //了解锦水-模块管理接口
|
|
|
|
that.browseNotice(res.data[0].id) |
|
|
|
that.noticeDetail(res.data[0].id) |
|
|
|
}).catch(err => { |
|
|
|
console.log(err) |
|
|
|
}) |
|
|
|
}, |
|
|
|
noticeDetail(noticeId){ |
|
|
|
let that = this; |
|
|
|