From c3d88ddd346f53aef4beced518e3f6f0bb815fa4 Mon Sep 17 00:00:00 2001
From: 云 <2163098428@qq.com>
Date: 星期一, 19 十月 2026 17:41:35 +0800
Subject: [PATCH] fix(qr-export): 解决下载接口业务异常处理问题

---
 src/main.ts |   12 +++++++++++-
 1 files changed, 11 insertions(+), 1 deletions(-)

diff --git a/src/main.ts b/src/main.ts
index 6a42557..1239af9 100644
--- a/src/main.ts
+++ b/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 };
+  }
+}
+
 /**
  * 搴旂敤鍒濆鍖栧畬鎴愪箣鍚庡啀杩涜椤甸潰鍔犺浇娓叉煋
  */
@@ -53,6 +59,10 @@
 
   // 绉婚櫎骞堕攢姣乴oading
   unmountGlobalLoading();
+  window.__MOM_STARTUP__?.finish();
 }
 
-initApplication();
+initApplication().catch((error: unknown) => {
+  window.__MOM_STARTUP__?.fail(error);
+  console.error('Application startup failed', error);
+});

--
Gitblit v1.9.3