add SSE开关

This commit is contained in:
陈西瓜i
2024-10-14 20:33:16 +08:00
parent 4918552492
commit 1644070e97
3 changed files with 6 additions and 0 deletions

View File

@ -4,6 +4,10 @@ import useNoticeStore from '@/store/modules/notice';
// 初始化
export const initSSE = (url: any) => {
if (import.meta.env.VITE_APP_SSE === 'false') {
return;
}
url = url + '?Authorization=Bearer ' + getToken() + '&clientid=' + import.meta.env.VITE_APP_CLIENT_ID
const {
data,