| | |
| | | import type { Ref } from 'vue'; |
| | | import { ref } from 'vue'; |
| | | import { GetSystemGlobalConfig } from '../api/system'; |
| | | import { SSE_URL } from '../constants'; |
| | | import { accessSessionKey } from '../utils/request'; |
| | | import { SSEClient } from '../utils/sse/SSEClient'; |
| | | import { Local } from '../utils/storage'; |
| | | import type { SystemGlobalConfig } from '../views/types'; |
| | | |
| | | /** |
| | | * 连接消息同步服务 |
| | |
| | | }; |
| | | |
| | | export const sseClient = connectMsgSyncService(); |
| | | |
| | | /** @description 系统全局配置 */ |
| | | export const systemGlobalConfig: Ref<SystemGlobalConfig> = ref({} as SystemGlobalConfig); |
| | | |
| | | /** |
| | | * 获取系统全局配置 |
| | | * @returns |
| | | */ |
| | | export const getSystemGlobalConfig = async () => { |
| | | const res = await GetSystemGlobalConfig({ |
| | | config_key_list: ['ui.project_city'].join(','), |
| | | }); |
| | | systemGlobalConfig.value = res.values ?? {}; |
| | | }; |