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:
iven
2026-05-21 13:44:13 +08:00
parent 652cccf66c
commit d576b8ba8f
68 changed files with 223 additions and 124 deletions

View File

@@ -49,7 +49,8 @@ export default function ConsentList() {
setConsents(append ? (prev) => [...prev, ...list] : list);
setTotal(res.total);
setPage(p);
} catch {
} catch (err) {
console.warn('[consent] 加载失败:', err);
Taro.showToast({ title: '加载失败', icon: 'none' });
} finally {
setLoading(false);
@@ -75,7 +76,8 @@ export default function ConsentList() {
const updated = await revokeConsent(consent.id, consent.version);
setConsents((prev) => prev.map((c) => c.id === updated.id ? updated : c));
Taro.showToast({ title: '已撤回', icon: 'success' });
} catch {
} catch (err) {
console.warn('[consent] 撤回失败:', err);
Taro.showToast({ title: '撤回失败', icon: 'none' });
} finally {
setRevoking(null);