refactor(layout): 重构应用布局结构
- 将原有布局中的侧边栏和头部组件拆分为独立的 AppSidebar 和 AppHeader 组件 - 移除内联的导航逻辑和样式,交由专用组件管理 - 更新图标库,优化部分图标的显示效果 - 简化认证存储逻辑,增强状态持久化与安全性 - 优化侧边栏状态管理机制,提高响应式体验 - 改进登录流程错误处理,增加网络异常提示 - 调整路由组件结构,提升代码可维护性
This commit is contained in:
@@ -37,8 +37,12 @@
|
||||
}
|
||||
} catch (e:unknown) {
|
||||
if (e instanceof Error) {
|
||||
console.error(e);
|
||||
toast.error(e.message);
|
||||
if (e.name === 'TypeError' && e.message.includes('fetch')) {
|
||||
toast.error("网络错误,请检查网络连接");
|
||||
} else {
|
||||
console.error(e);
|
||||
toast.error(e.message || '登录失败,请重试');
|
||||
}
|
||||
} else {
|
||||
console.error(e);
|
||||
toast.error('登录失败,请重试');
|
||||
|
||||
Reference in New Issue
Block a user