添加通知设置页面

This commit is contained in:
hanhh
2021-09-18 01:44:55 +08:00
parent bb0ad6c325
commit 0a9e9e972d
8 changed files with 278 additions and 6 deletions
+20 -1
View File
@@ -39,7 +39,26 @@ export default class NotificationService {
this.content = content;
this.params = rest;
const notificationModeAction = this.modeMap.get(type);
notificationModeAction?.call(this);
try {
return await notificationModeAction?.call(this);
} catch (error: any) {
return error.message;
}
}
}
public async testNotify(
info: NotificationInfo,
title: string,
content: string,
) {
const { type, ...rest } = info;
if (type) {
this.title = title;
this.content = content;
this.params = rest;
const notificationModeAction = this.modeMap.get(type);
return await notificationModeAction?.call(this);
}
}