chore: sse配置文件关闭

This commit is contained in:
dap
2024-12-19 11:27:23 +08:00
parent 6183d22b20
commit d304e8a2a3
6 changed files with 28 additions and 13 deletions

View File

@@ -12,7 +12,7 @@ import { notification } from 'ant-design-vue';
import dayjs from 'dayjs';
import { defineStore } from 'pinia';
const { apiURL, clientId } = useAppConfig(
const { apiURL, clientId, sseEnable } = useAppConfig(
import.meta.env,
import.meta.env.PROD,
);
@@ -40,6 +40,12 @@ export const useNotifyStore = defineStore(
* 开始监听sse消息
*/
function startListeningMessage() {
/**
* 未开启 不监听
*/
if (!sseEnable) {
return;
}
const accessStore = useAccessStore();
const token = accessStore.accessToken;