refactor: 消息提示显示弹框

This commit is contained in:
Captain.B 2021-08-22 15:39:03 +08:00 committed by 刘瑞斌
parent b80953378c
commit f19a571b4c
1 changed files with 4 additions and 1 deletions

View File

@ -150,8 +150,11 @@ export default {
showNotification() {
this.result = this.$post('/notification/list/all/' + 1 + '/' + 10, {}, response => {
let data = response.data.listObject;
let now = new Date().getTime();
data.filter(d => d.status === 'UNREAD').forEach(d => {
if (now - d.createTime > 10 * 1000) {
return;
}
let title = d.type === 'MENTIONED_ME' ? '@提到我的' : '系统通知';
setTimeout(() => {
this.$notify({