Browse Source

[完善]列表刷新延迟一秒

master
邵佳豪 2 years ago
parent
commit
9176416e47
  1. 41
      src/app/pages/home/home.component.ts

41
src/app/pages/home/home.component.ts

@ -129,29 +129,28 @@ export class HomeComponent implements OnInit {
reloadPage = (userNotification) => {
console.log("abp.notifications.received收到通知", userNotification);
setTimeout(() => {
if (this.router.url.indexOf("records") != -1) {
let obj;
if (!userNotification.notification.data.properties.Positive) {
obj = {
type: "add",
data: userNotification,
};
this.receiptOfNotification(userNotification); //右下角弹窗+播报语音
} else {
obj = {
type: "delete",
data: userNotification,
};
}
this.listRefreshService.sendMessage(obj); //发布一条消息
if (this.router.url.indexOf("records") != -1) {
let obj;
if (!userNotification.notification.data.properties.Positive) {
obj = {
type: "add",
data: userNotification,
};
this.receiptOfNotification(userNotification); //右下角弹窗+播报语音
} else {
if (!userNotification.notification.data.properties.Positive) {
this.receiptOfNotification(userNotification); //右下角弹窗+播报语音
}
obj = {
type: "delete",
data: userNotification,
};
}
}, 1000);
setTimeout(() => {
this.listRefreshService.sendMessage(obj); //发布一条消息
}, 1000);
} else {
if (!userNotification.notification.data.properties.Positive) {
this.receiptOfNotification(userNotification); //右下角弹窗+播报语音
}
}
};
ngAfterViewInit() {

Loading…
Cancel
Save