|
@@ -1,6 +1,7 @@
|
|
|
// 官方文档:https://docs.microsoft.com/zh-cn/aspnet/core/signalr/javascript-client?view=aspnetcore-6.0&viewFallbackFrom=aspnetcore-2.2&tabs=visual-studio
|
|
|
import * as signalR from '@microsoft/signalr';
|
|
|
import mittBus from '@/utils/mitt';
|
|
|
+
|
|
|
export default {
|
|
|
// signalR对象
|
|
|
SR: null as any,
|
|
@@ -77,6 +78,10 @@ export default {
|
|
|
connection.on('orderHandlingDetail', (message: any) => {
|
|
|
mittBus.emit('orderHandlingDetail', message);// 通知
|
|
|
});
|
|
|
+ // 服务端推送消息
|
|
|
+ connection.on('enforcementOrderHandlingDetail', (message: any) => {
|
|
|
+ mittBus.emit('enforcementOrderHandlingDetail', message);// 通知
|
|
|
+ });
|
|
|
},
|
|
|
/**
|
|
|
* @description 调用 this.signalR.start().then(async () => { await this.SR.invoke("method")})
|