[update] 变更:首页消息有超时未读的弹框提醒

This commit is contained in:
lideqin
2023-07-13 18:39:40 +08:00
parent 3fa9c4186b
commit 1222799fcf
2 changed files with 36 additions and 8 deletions
+32 -8
View File
@@ -274,10 +274,10 @@ Page({
onShow: function () {
const that = this
let menuArrStand = [{
path: '../../assets/images/gongzuozu-new.png',
text: '工作组',
val: '1',
},
path: '../../assets/images/gongzuozu-new.png',
text: '工作组',
val: '1',
},
{
path: '../../assets/images/fenbiaowei-new.png',
text: '分标委',
@@ -311,10 +311,10 @@ Page({
]
let menuArr = [{
path: '../../assets/images/gongzuozu-new.png',
text: '工作组',
val: '1',
},
path: '../../assets/images/gongzuozu-new.png',
text: '工作组',
val: '1',
},
{
path: '../../assets/images/fenbiaowei-new.png',
text: '分标委',
@@ -380,6 +380,30 @@ Page({
}
})
// 2023-07变更:调接口看有没有超出消息提醒截止时间未读的,如果有则弹框提示
UserApi.messageOverTimeUnreadList().then(res => {
if (res.success) {
if (res.result && res.result.length > 0) {
const messageArr = res.result.map(item => item.msgContent)
const anntIds = res.result.map(item => item.anntId).join(',')
wx.showModal({
title: '超时未读提醒',
content: messageArr.join('\n'),
showCancel: false,
confirmText: '知道了',
success: () => {
// 点击知道了把这些超时未读消息变成已读
UserApi.messageOverTimeToRead({anntIds: anntIds}).then(res => {
if (res.success) {
this.messageDetail({currentTarget: {dataset: {message: {readFlag: 0, anntId: ''}}}})
this.loadData()
}
})
}
})
}
}
})
},
/**
* 页面上拉触底事件的处理函数