diff --git a/entry/src/main/ets/data/FbCardForms.ets b/entry/src/main/ets/data/FbCardForms.ets index 99dd977..b84ff92 100644 --- a/entry/src/main/ets/data/FbCardForms.ets +++ b/entry/src/main/ets/data/FbCardForms.ets @@ -223,6 +223,14 @@ class FbCardFormsImpl { async pushAll(ctx: common.Context): Promise { const list: string[] = await this.ids(ctx); if (list.length === 0) { + /* ⚠️ 这一条**必须留**(2026-10-21 真机排障时加的): + 修复前这里静默 return,听起来无害,实际是"整条链路断掉也毫无痕迹"—— + 我用 hilog 查 `pushAll` 时一个字符都抓不到,只能一路读代码猜。 + v73 的根因(跨进程 preferences 读到空表)就死在这一行上, + 而现场唯一能看到的只是"卡片不刷新"。 + ⇒ 留一条 warn:下次再出现"卡片不动",看日志立刻能分清是 + "没注册表"还是"注册了但更新失败",不用再从代码反推。 */ + hilog.warn(DOMAIN, TAG, 'pushAll:注册表为空(桌面没有卡片,或跨进程没读到)'); return; } const cache: Map = @@ -244,6 +252,8 @@ class FbCardFormsImpl { stale.push(formId); } } + hilog.info(DOMAIN, TAG, 'pushAll:已推 %{public}d 张卡(%{public}d 种偏移)', + list.length, cache.size); if (stale.length > 0) { const keep: string[] = list.filter((id: string): boolean => stale.indexOf(id) < 0); await this.saveIds(ctx, keep);