wujingjing
2025-02-25 4fb206d45bed4d8839172ddd75c3569ac8dbdb75
src/main.ts
@@ -11,8 +11,11 @@
import { initBackEndControlRoutes } from './router/backEnd';
import '/@/theme/index.scss';
import '@amap/amap-jsapi-types';
import { getAllData ,pingLogin} from './stores/chatRoom';
import { autoLogin, getAllData ,getGlobalPosition,pingLogin} from './stores/chatRoom';
import { setTheme } from '/@/utils/theme';
import { accessSessionKey } from './utils/request';
import { Local } from './utils/storage';
import { getSystemGlobalConfig } from './stores/global';
// setTheme();
const app = createApp(App);
@@ -25,9 +28,16 @@
(async function () {
   await initBackEndControlRoutes();
   const session = Local.get(accessSessionKey);
   if (!session) {
      await autoLogin();
   }
   app.use(pinia).use(router).use(ElementPlus).use(i18n).mount('#app');
})();
// 获取全局数据
getAllData();
pingLogin();
getGlobalPosition();
getSystemGlobalConfig();