diff --git a/index.html b/index.html index 4659ab6..c6ecdf1 100644 --- a/index.html +++ b/index.html @@ -6,8 +6,8 @@ 妈妈盒子 · 孕育陪伴 - - + + @@ -1758,8 +1758,8 @@ 加载失败/离线时 window.wx 为 undefined,goMall() 会降级为 toast 提示, 不影响应用其余功能。 --> - - -
v26090712
+ + +
v26090713
diff --git a/js/app.js b/js/app.js index 4efdeb7..a6eb54f 100644 --- a/js/app.js +++ b/js/app.js @@ -1775,6 +1775,13 @@ $('#genWeekTag').textContent = '--'; /* ④ 信件/称呼:新用户无信(后端不播种),列表走 letterEmpty 空提示 */ $('#replyTo').textContent = nm; + /* ⑤ 孕期衍生的静态演示位(生长曲线周数/孕检日历/时光轴日期)一并归中性占位, + 不保留 HTML 里的演示默认值(孕27周/9月15日…) */ + $$('[data-ga]').forEach(n => { n.textContent = '--'; }); + $$('[data-wk]').forEach(n => { n.textContent = '--'; }); + $('#calNext').textContent = '--'; + const _t = new Date(); + $('#noteWhen').textContent = mdTxt(_t); syncBabyWords(); pushLatestToHome(); renderLetters(); @@ -4063,8 +4070,10 @@ const pj = rs[0], pg = rs[1]; if (pj && pj.code === 200 && pj.result) { const p = pj.result; - if (p.babyName) state.babyName = p.babyName; - if (p.userName) state.userName = p.userName; + /* 服务端是唯一事实源:新用户 babyName 为空也要覆盖内置演示名(小汤圆), + 让全站称呼走 babyWord 的「宝宝」兜底 */ + state.babyName = p.babyName || ''; + state.userName = p.userName || ''; if (p.babySex && p.babySex !== 'unknown') state.babySex = p.babySex; if (p.dueDate) { const d = parseDay(p.dueDate); if (d) state.due = d; } /* 状态化「我的」页:未授权→占位+显示授权入口;已授权→资料+隐藏授权入口;已建档(B→C)由孕期信息卡引导 */