diff --git a/index.html b/index.html index 34de0c5..e4bf0a8 100644 --- a/index.html +++ b/index.html @@ -6,8 +6,8 @@ 妈妈盒子 · 孕育陪伴 - - + + @@ -1746,7 +1746,9 @@ - + +
@@ -1769,8 +1771,8 @@ 加载失败/离线时 window.wx 为 undefined,goMall() 会降级为 toast 提示, 不影响应用其余功能。 --> - - -
v26090728
+ + +
v26090729
diff --git a/js/app.js b/js/app.js index 48b0c5a..be44c9f 100644 --- a/js/app.js +++ b/js/app.js @@ -1789,6 +1789,7 @@ pgDay.value = ''; lockWeekFields(true); } + syncDuePh(); /* 头像预览跟随卡片(有正式头像才显示;新用户空圆 + +号) */ const _me = $('#meAvatar'); if (_me && _me.classList.contains('has-img') && meAvatarImg && meAvatarImg.src) { @@ -1800,8 +1801,15 @@ } } + /* 预产期占位层:空值显示「- 年 - 月 - 日」,选了值隐藏 */ + function syncDuePh() { + const ph = $('#pgDuePh'); + if (ph) ph.style.display = pgDue.value ? 'none' : 'block'; + } + /* 预产期一变,孕周 / 额外天数自动算出来 */ pgDue.addEventListener('change', () => { + syncDuePh(); const due = parseDay(pgDue.value); if (!due) { lockWeekFields(true); return; } const ga = gaFromDue(due); diff --git a/mama-box.css b/mama-box.css index 5056813..f0209c6 100644 --- a/mama-box.css +++ b/mama-box.css @@ -2652,3 +2652,7 @@ a.skip:focus{left:16px;top:16px} .empty-guide .eg-s{font-size:12.5px;color:var(--muted,#A79C95);margin-bottom:18px;line-height:1.6} .empty-guide .eg-btn{display:inline-block;padding:11px 34px;border:none;border-radius:12px;background:#F4593C;color:#fff;font-size:14px;font-weight:700;cursor:pointer} .empty-guide .eg-btn:active{transform:scale(.97)} + +/* 预产期 date 输入的空值占位(原生 date 不支持 placeholder) */ +.fld-date{position:relative} +.fld-date .date-ph{position:absolute;left:16px;bottom:14px;font-size:14px;color:#C9B7AC;pointer-events:none;display:block}