fix(analytics): 完善群成员分析失败时的错误边界处理与UI展示

This commit is contained in:
Leoluis0705
2026-03-25 19:15:12 +08:00
parent 3c0683b9f8
commit a46b52e603
2 changed files with 9 additions and 2 deletions

View File

@@ -1531,7 +1531,9 @@ class GroupAnalyticsService {
try {
while (true) {
const batch = await wcdbService.fetchMessageBatch(cursor)
if (!batch.success) break
if (!batch.success) {
return { success: false, error: batch.error || '获取分析数据失败' }
}
const rows = Array.isArray(batch.rows) ? batch.rows as Record<string, any>[] : []
if (rows.length === 0) break