Browse Source

消息改通知

integral
zhaoyongnian 5 years ago
parent
commit
680e42d340
  1. 18
      epdc-resident-mp-yushan/pages/index/index.js
  2. 3
      epdc-resident-mp-yushan/pages/index/index.wxml

18
epdc-resident-mp-yushan/pages/index/index.js

@ -12,6 +12,7 @@ Page({
newsList: [], // 新闻列表
projectList: [], // 项目列表
infoList: [], // 消息列表
noticeList: [], // 通知公告列表
unReadNum: 0, // 未读数量
loadMoreType: 'none',
loadMoreVisible: false,
@ -47,6 +48,7 @@ Page({
this.getUserState()
},
onShow () {
this.getUnreadNum() // 实时获取有无未读消息
// 检查版本更新
checkoutVersion()
},
@ -187,6 +189,21 @@ Page({
}).catch((err) => {
console.log('获取消息列表失败')
})
},
// 获取通知公告列表
getNoticeList () {
let para = {
pageIndex: 1,
pageSize: 10,
timestamp: this.data.timestamp
}
homeApi.getNoticeList(para).then(res => {
this.setData({
noticeList: res.data
})
}).catch(err => {
console.log(err)
})
},
// 九宫格检查状态
getIndexSudokuState () {
@ -280,6 +297,7 @@ Page({
this.getIndexSudokuState()
this.getProjectList()
this.getInfoList()
this.getNoticeList()
this.getUnreadNum()
this.getNewsList()
},

3
epdc-resident-mp-yushan/pages/index/index.wxml

@ -30,8 +30,7 @@
<!--通知公告列表 注 以前是消息列表,通知公告需求还没有定下来,数据获取的还是消息的列表数据-->
<notice
bind:navigateToInfoList="navigateToInfoList"
infoList="{{infoList}}"
unreadnum="{{unReadNum}}">
noticeList="{{noticeList}}">
</notice>
<!--sudoku九宫格-->

Loading…
Cancel
Save