diff --git a/public/js/app.js b/public/js/app.js index 819ca17..af10589 100644 --- a/public/js/app.js +++ b/public/js/app.js @@ -13,7 +13,6 @@ const App = { async init() { try { const s = await API.get('/install/status'); if (!s.installed) { location.hash = '#/install'; return; } } catch { location.hash = '#/install'; return; } - this.loadFooter(); window.addEventListener('hashchange', () => this.route()); this.route(); }, @@ -85,7 +84,9 @@ const App = { const pub = document.getElementById('public-page'); pub.classList.remove('hidden'); const comp = page === 'login' ? LoginPage : page === 'register' ? RegisterPage : page === 'install' ? InstallPage : HomePage; - comp.render(param).then(html => { pub.innerHTML = html; if (comp.mount) comp.mount(param); }); + comp.render(param).then(html => { pub.innerHTML = html; if (comp.mount) comp.mount(param); }).catch(() => { + pub.innerHTML = '
请刷新页面重试