update 添加websocket功能推送员工报警信息

This commit is contained in:
zk
2023-12-08 14:20:35 +08:00
parent 622181ac96
commit 190d69573f
13 changed files with 240 additions and 33 deletions
+12 -2
View File
@@ -1,5 +1,4 @@
import axios from 'axios';
import requestURL from './url';
import { getAppEnvConfig } from '../utils/env.ts';
const { VITE_GLOB_API_URL } = getAppEnvConfig();
@@ -29,4 +28,15 @@ export const get = (url, params) => {
reject(err.data);
});
});
};
};
export const post = (url: string, params: any) =>
new Promise((resolve, reject) => {
service
.post(url, params)
.then((res: any) => {
resolve(res.data);
})
.catch((err: any) => {
reject(err);
});
});