diff --git a/index.html b/index.html index eb98fa5..ff904e2 100644 --- a/index.html +++ b/index.html @@ -7,7 +7,7 @@ 兜爸心选 · 孕育陪伴 - + diff --git a/js/app.js b/js/app.js index 0da44b4..5ca0624 100644 --- a/js/app.js +++ b/js/app.js @@ -3,7 +3,7 @@ (function () { 'use strict'; /* 页面版本号(YYMMDD+序号):显示在「关于兜爸心选」页底部;bump 时同步 head 注释与 ?v= */ - var VER = '26092004'; + var VER = '26092005'; const $ = (s, c) => (c || document).querySelector(s); const $$ = (s, c) => Array.from((c || document).querySelectorAll(s)); @@ -1336,10 +1336,14 @@ function applyLaixinReminder(r) { const card = $('#homeLetter'), body = $('#homeBody'); if (!card) return; - /* 访客态(没身份)、后端说他没建档、上游降级、未读为 0 —— 一律收起。 - ⚠️ 与底 tab 角标同一套判据,两处别各写一份。 */ - const has = r && r.ok !== false && Number(r.unread) > 0; - if (!has || !hashParam('openid') || state.pregEmpty) { hideLetterCard(); return; } + /* 上游降级(ok:false)或未读为 0 —— 收起。 + ⚠️ 与底 tab 红点**同一套判据**,两处别各写一份(写歪一处就会出现 + 「红点亮了、卡没出来」这种自相矛盾的屏)。 + ⚠️⚠️ 这里**故意不看 state.pregEmpty**:那是「兜爸心选档案未建档」, + 与「宝宝来信里有没有信」是两件事。加过一版,结果生产上实测出 + 「红点有 1 封未读、卡不显示」—— 用户能从 laixin 收到信, + 却未必在 mama-box 填过预产期。别再加回来。 */ + if (!r || r.ok === false || !(Number(r.unread) > 0)) { hideLetterCard(); return; } const letters = Number(r.unreadLetters) || 0; const replies = Number(r.unreadReplies) || 0; /* 两种都有时分开讲,别合成一个含糊的总数(用户不知道「3」是什么东西) */