Home > Net >  Abp v6.0 (ts). The.net core (3.0) issued a notice front-end abp. Notifications. Received do not ente
Abp v6.0 (ts). The.net core (3.0) issued a notice front-end abp. Notifications. Received do not ente

Time:01-24

In the Startup. Cs
//this has nothing to do with notice?
App. UseEndpoints (endpoints=& gt;
{
Endpoints. MapHub ("/MessageHub ");

});

Domain layer released back-end code
 
Public class NotificationAppService: BusinessAssistantAppServiceBase INotificationAppService, ITransientDependency
{
Private readonly INotificationPublisher _notiticationPublisher;

Public NotificationAppService (INotificationPublisher notificationPublisher)
{
_notiticationPublisher=notificationPublisher;
}

//send the regular notice to the user
Public async Task Publish_SentFrendshipRequest (string senderUserName, string friendshipMessage)
{
Await _notiticationPublisher. PublishAsync (" SentFrendshipRequest, "
New SentFrendshipRequestNotificationData (senderUserName friendshipMessage),
UserIds: new [] {new Abp. UserIdentifier (null, 3), new Abp. The UserIdentifier (1, 2), new Abp. The UserIdentifier (1, 1)}, severity: NotificationSeverity. Success);

}

}

Front-end Vue listening code main. Vue
 
The init () {
Util. Abp. Event. On (' abp. Notifications. Received ', function (userNotification) {
The console. The log (userNotification);
});
}

Notice after the end, the front-end abp. Event. On to monitor the global event abp. Notifications. Received does not enter, don't know what is the problem, please give directions, thank you.
  • Related