fix: 消息提示框以及消息点击查看后需要标记已读按钮优化

This commit is contained in:
Chopper711 2025-02-20 15:48:19 +08:00
parent ebf4d6d3eb
commit a85ec69549

View File

@ -109,8 +109,6 @@
API_Index.read(v.id).then(res => { API_Index.read(v.id).then(res => {
this.loading = false; this.loading = false;
if (res.success) { if (res.success) {
this.$Message.success("操作成功");
this.currentMessageType = "unread"
this.getAll(); this.getAll();
} }
}); });
@ -137,9 +135,7 @@
API_Index.deleteMessage(v.id).then(res => { API_Index.deleteMessage(v.id).then(res => {
this.loading = false; this.loading = false;
if (res.success) { if (res.success) {
this.$Message.success("删除成功"); this.refreshMessage()
this.currentMessageType = "read"
this.getAll();
} }
}); });
} }
@ -166,9 +162,7 @@
API_Index.reductionMessage(v.id).then(res => { API_Index.reductionMessage(v.id).then(res => {
this.loading = false; this.loading = false;
if (res.success) { if (res.success) {
this.setCurrentMesType("read"); this.refreshMessage()
this.recycleBinCount -= 1
this.hasReadCount +=1
} }
}); });
} }
@ -194,9 +188,7 @@
API_Index.clearMessage(v.id).then(res => { API_Index.clearMessage(v.id).then(res => {
this.loading = false; this.loading = false;
if (res.success) { if (res.success) {
this.$Message.success("删除成功"); this.refreshMessage()
this.currentMessageType = "recycleBin"
this.getAll();
} }
}); });
} }
@ -383,9 +375,7 @@
API_Index.read(v.id).then(res => { API_Index.read(v.id).then(res => {
this.loading = false; this.loading = false;
if (res.success) { if (res.success) {
this.$Message.success("操作成功"); this.getAll()();
this.currentMessageType = "unread"
this.getAll();
} }
}); });
} }