src/utils/websocket.ts
@@ -19,10 +19,8 @@ */ import { getToken } from '@/utils/auth'; import useNoticeStore from '@/store/modules/notice'; import { ElNotification } from 'element-plus'; const { addNotice } = useNoticeStore(); import useNoticeStore from '@/store/modules/notice'; let socketUrl: any = ''; // socket地址 let websocket: any = null; // websocket 实例 @@ -125,7 +123,7 @@ if (e.data.indexOf('ping') > 0) { return; } addNotice({ useNoticeStore().addNotice({ message: e.data, read: false, time: new Date().toLocaleString()