wujingjing
2025-02-17 f9dfbfe05c8026f1be02f452e52178191ed5ed7f
src/main.ts
@@ -11,8 +11,10 @@
import { initBackEndControlRoutes } from './router/backEnd';
import '/@/theme/index.scss';
import '@amap/amap-jsapi-types';
import { getAllData } from './stores/chatRoom';
import { autoLogin, getAllData ,pingLogin} from './stores/chatRoom';
import { setTheme } from '/@/utils/theme';
import { accessSessionKey } from './utils/request';
import { Local } from './utils/storage';
// setTheme();
const app = createApp(App);
@@ -25,8 +27,13 @@
(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();