增加消息管理

This commit is contained in:
刘祥超
2020-10-20 20:18:12 +08:00
parent 8fdc551ad8
commit 98b6c012b7
15 changed files with 274 additions and 3 deletions

View File

@@ -0,0 +1,26 @@
Tea.context(function () {
this.updateAllRead = function () {
let that = this
teaweb.confirm("确定要设置所有的未读消息为已读吗?", function () {
that.$post("/messages/readAll")
.success(function () {
window.location = "/messages"
})
})
}
this.updatePageRead = function () {
let that = this
teaweb.confirm("确定要设置当前页的未读消息为已读吗?", function () {
let messageIds = []
that.messages.forEach(function (v) {
messageIds.push(v.id)
})
that.$post("/messages/readPage")
.params({
messageIds: messageIds
})
.refresh()
})
}
})