v26110267 预览:首页头图倒计时翻牌;百宝箱入口人数改几十万带小数;30 个测试开始页按参考图精简居中;产假计算器模式(calc=1)计算器置顶

Co-Authored-By: AI 助手
This commit is contained in:
deploy
2026-11-03 22:26:34 +00:00
parent a536e81e01
commit aabe4f9b38
14 changed files with 211 additions and 138 deletions

View File

@@ -3,7 +3,7 @@
(function () {
'use strict';
/* 页面版本号(YYMMDD+序号):显示在「关于兜爸心选」页底部;bump 时同步 head 注释与 ?v= */
var VER = '26110266';
var VER = '26110267';
const $ = (s, c) => (c || document).querySelector(s);
const $$ = (s, c) => Array.from((c || document).querySelectorAll(s));
@@ -1832,6 +1832,9 @@
$('#heroSize').textContent = o.size || '';
$('#heroWeekU').textContent = o.unit == null ? '周' : o.unit;
$('.hero-pane').classList.toggle('is-born', !!o.born);
/* 11-03 用户:「首页头图小孩左边做成倒计时的感觉」→ 孕期且有天数时换成翻页数字牌 + 时分秒走字(js/hero-cd.js),其余状态照旧 */
window.__mbHeroLeft = o.left > 0 ? o.left : 0;
if (window.__mbHeroCd) window.__mbHeroCd(window.__mbHeroLeft);
bar.style.width = '0%';
requestAnimationFrame(() => requestAnimationFrame(() => { bar.style.width = Math.max(0, Math.min(100, o.pct || 0)) + '%'; }));
}
@@ -2095,6 +2098,7 @@
const sz = babySize(week);
setHero({
due: left > 0 ? '距离见面还有 <b>' + left + '</b> 天' : '宝宝随时会来见你',
left: left,
emoji: sz.emoji, hi: window.handIcons && (handIcons.week(week) || {}).id, size: '像' + sz.name.replace(/^一[个颗根只串把粒条棵颗]/, ''), pct: pct
});
}