兰宝车间质量管理系统-前端
src/utils/websocket.ts
@@ -20,7 +20,7 @@
import { getToken } from '@/utils/auth';
import useNoticeStore from '@/store/modules/notice';
import { ElNotification } from "element-plus";
import { ElNotification } from 'element-plus';
const { addNotice } = useNoticeStore();
@@ -33,7 +33,7 @@
// 初始化socket
export const initWebSocket = (url: any) => {
  if (!import.meta.env.VITE_APP_WEBSOCKET) {
  if (import.meta.env.VITE_APP_WEBSOCKET === 'false') {
    return;
  }
  socketUrl = url;
@@ -135,7 +135,7 @@
      message: e.data,
      type: 'success',
      duration: 3000
    })
    });
    return e.data;
  };
};