fix(mp): 空 catch 块添加 console.warn 日志(82 处)
55 个文件中 82 处空 catch 块添加模块前缀日志输出: - stores: auth/health/points (7 处) - services: request/ai-chat/health/ble/* (10 处) - hooks: useLongPolling/usePagination (3 处) - pages: 核心+子包共 35 个页面 (62 处) 保留静默的 catch: secure-storage fallback、Storage 恢复、 analytics 防洪、BLE 断连清理、用户拒绝订阅等合理忽略场景
This commit is contained in:
@@ -69,7 +69,7 @@ export function useHomeData() {
|
||||
const res = await notificationService.getUnreadCount() as { data?: { count?: number } | number };
|
||||
const d = res.data;
|
||||
setUnreadCount(typeof d === 'object' && d ? (d.count ?? 0) : 0);
|
||||
} catch { /* ignore */ }
|
||||
} catch (err) { console.warn('[home] 获取未读消息数失败:', err); }
|
||||
};
|
||||
|
||||
const loadReminders = async (patientId: string) => {
|
||||
@@ -110,7 +110,8 @@ export function useHomeData() {
|
||||
}
|
||||
}
|
||||
setReminders(items.slice(0, 3));
|
||||
} catch {
|
||||
} catch (err) {
|
||||
console.warn('[home] 加载提醒列表失败:', err);
|
||||
setReminders([]);
|
||||
} finally {
|
||||
setRemindersLoading(false);
|
||||
|
||||
Reference in New Issue
Block a user