trustbase-seller-backend 0.7.4 → 0.7.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/web/dist/app.js +8 -0
package/package.json
CHANGED
package/web/dist/app.js
CHANGED
|
@@ -10,6 +10,14 @@ const API = window.location.origin + '/api';
|
|
|
10
10
|
const app = document.getElementById('app');
|
|
11
11
|
const offlineBar = document.getElementById('offline-bar');
|
|
12
12
|
|
|
13
|
+
// 2026-10-17 kimi: 不再静默白屏 — 把启动/脚本/异步错误直接显示在页面上。
|
|
14
|
+
function showFatalError(where, err) {
|
|
15
|
+
const msg = err && err.message ? err.message : String(err || '未知错误');
|
|
16
|
+
app.innerHTML = `<div class="empty"><div class="empty-icon">⚠️</div><p>${esc(where)}: ${esc(msg)}</p></div>`;
|
|
17
|
+
}
|
|
18
|
+
window.addEventListener('error', (e) => showFatalError('脚本错误', e.error || e.message));
|
|
19
|
+
window.addEventListener('unhandledrejection', (e) => showFatalError('异步错误', e.reason));
|
|
20
|
+
|
|
13
21
|
// ============================================================
|
|
14
22
|
// 状态管理 (极简)
|
|
15
23
|
// ============================================================
|