liu
3 天以前 ee7ac8df8bce38add1f75baf876b49de94b9e00a
src/main.ts
@@ -7,6 +7,12 @@
declare const __APP_FAVICON__: string;
declare const __APP_NAME__: string;
declare global {
  interface Window {
    __MOM_STARTUP__?: { finish: () => void; fail: (error: unknown) => void };
  }
}
/**
 * 应用初始化完成之后再进行页面加载渲染
 */
@@ -35,6 +41,10 @@
      copyright: { companyName: __APP_NAME__ },
    });
  }
  // 强制覆盖默认首页为"基础数据与一袋一码",绕过 localStorage 缓存
  preferencesManager.updatePreferences({
    app: { defaultHomePath: '/bagcode-home' },
  });
  if (__APP_FAVICON__) {
    const link = document.querySelector('link[rel="icon"]');
    if (link) {
@@ -49,6 +59,10 @@
  // 移除并销毁loading
  unmountGlobalLoading();
  window.__MOM_STARTUP__?.finish();
}
initApplication();
initApplication().catch((error: unknown) => {
  window.__MOM_STARTUP__?.fail(error);
  console.error('Application startup failed', error);
});