mahjong_group/common/server/config.js
2025-09-08 12:47:02 +08:00

24 lines
479 B
JavaScript

import {
getConfig
} from '@/common/server/interface/common'
import {
ref
} from 'vue';
export const configData = ref(null);
export const preloadConfigData = async () => {
const res = await getConfig();
configData.value = {
config: res
};
console.log("configData.value", configData.value);
};
export const getConfigData = async () => {
if (configData.value == null) {
await preloadConfigData();
}
return configData.value;
}