From 1b79ef8bf28dc6e1252b3f129b60095c46a6765f Mon Sep 17 00:00:00 2001 From: wujingjing <gersonwu@qq.com> Date: 星期四, 27 二月 2025 15:49:03 +0800 Subject: [PATCH] 用户终止生成 --- src/stores/global.ts | 18 ++++++++++++++++++ 1 files changed, 18 insertions(+), 0 deletions(-) diff --git a/src/stores/global.ts b/src/stores/global.ts index 22d3d9a..f82badc 100644 --- a/src/stores/global.ts +++ b/src/stores/global.ts @@ -1,7 +1,11 @@ +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'; /** * 杩炴帴娑堟伅鍚屾鏈嶅姟 @@ -23,3 +27,17 @@ }; 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 ?? {}; +}; -- Gitblit v1.9.3