import { getConfig } from '@/http/api/base' import { useRootStore } from '@/store/root' export const useConfig = async () => { const store = useRootStore() try { const [_config] = await Promise.all([getConfig()]) store.SET_CONFIG(_config.data) Promise.resolve() } catch (error) { console.log('error: ', error) } }