mirror of
https://github.com/TeaOSLab/EdgeAdmin.git
synced 2025-12-10 00:00:26 +08:00
增加消息管理
This commit is contained in:
26
web/views/@default/messages/index.js
Normal file
26
web/views/@default/messages/index.js
Normal 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()
|
||||
})
|
||||
}
|
||||
})
|
||||
Reference in New Issue
Block a user