头图进度条小水果、档案页宝宝大小也换手绘图标库(库没加载退回 emoji)v26101209
Co-Authored-By: AI 助手
This commit is contained in:
@@ -7,7 +7,7 @@
|
|||||||
<meta name="mobile-web-app-capable" content="yes">
|
<meta name="mobile-web-app-capable" content="yes">
|
||||||
<meta name="apple-mobile-web-app-capable" content="yes">
|
<meta name="apple-mobile-web-app-capable" content="yes">
|
||||||
<title>兜爸心选 · 孕育陪伴</title>
|
<title>兜爸心选 · 孕育陪伴</title>
|
||||||
<!-- V:26101208 缓存版本标记:改 css/js 时同步 bump 该值(与 js/app.js 的 VER 同源),静态资源按 mtime 走 ETag 自动刷新 -->
|
<!-- V:26101209 缓存版本标记:改 css/js 时同步 bump 该值(与 js/app.js 的 VER 同源),静态资源按 mtime 走 ETag 自动刷新 -->
|
||||||
<link rel="stylesheet" href="mama-box.css">
|
<link rel="stylesheet" href="mama-box.css">
|
||||||
<link rel="stylesheet" href="night.css">
|
<link rel="stylesheet" href="night.css">
|
||||||
<!-- 夜晚模式:首屏绘制前就按上次的选择加 class,避免先白后黑闪一下(开关在首页右上角 #nightBtn,逻辑见 app.js) -->
|
<!-- 夜晚模式:首屏绘制前就按上次的选择加 class,避免先白后黑闪一下(开关在首页右上角 #nightBtn,逻辑见 app.js) -->
|
||||||
|
|||||||
15
js/app.js
15
js/app.js
@@ -3,7 +3,7 @@
|
|||||||
(function () {
|
(function () {
|
||||||
'use strict';
|
'use strict';
|
||||||
/* 页面版本号(YYMMDD+序号):显示在「关于兜爸心选」页底部;bump 时同步 head 注释与 ?v= */
|
/* 页面版本号(YYMMDD+序号):显示在「关于兜爸心选」页底部;bump 时同步 head 注释与 ?v= */
|
||||||
var VER = '26101208';
|
var VER = '26101209';
|
||||||
const $ = (s, c) => (c || document).querySelector(s);
|
const $ = (s, c) => (c || document).querySelector(s);
|
||||||
const $$ = (s, c) => Array.from((c || document).querySelectorAll(s));
|
const $$ = (s, c) => Array.from((c || document).querySelectorAll(s));
|
||||||
|
|
||||||
@@ -1515,7 +1515,8 @@
|
|||||||
const bar = $('#heroBar');
|
const bar = $('#heroBar');
|
||||||
if (!bar) return;
|
if (!bar) return;
|
||||||
$('#heroDueT').innerHTML = o.due;
|
$('#heroDueT').innerHTML = o.due;
|
||||||
$('#heroFruit').textContent = o.emoji || '';
|
/* 2026-10-12 用户:「首页最上面像卷心菜,图标没用统一的」→ 进度条上的小水果也走手绘图标库,库没加载退回 emoji */
|
||||||
|
setHandIco($('#heroFruit'), o.hi, o.emoji || '');
|
||||||
$('#heroSize').textContent = o.size || '';
|
$('#heroSize').textContent = o.size || '';
|
||||||
$('#heroWeekU').textContent = o.unit == null ? '周' : o.unit;
|
$('#heroWeekU').textContent = o.unit == null ? '周' : o.unit;
|
||||||
$('.hero-pane').classList.toggle('is-born', !!o.born);
|
$('.hero-pane').classList.toggle('is-born', !!o.born);
|
||||||
@@ -1630,7 +1631,7 @@
|
|||||||
/* ② 首页 hero */
|
/* ② 首页 hero */
|
||||||
const hw = $('#heroWeek');
|
const hw = $('#heroWeek');
|
||||||
if (hw) hw.textContent = '已出生';
|
if (hw) hw.textContent = '已出生';
|
||||||
setHero({ due: nm + '已经来到身边', emoji: '👶', size: '', unit: '', pct: 100, born: true });
|
setHero({ due: nm + '已经来到身边', emoji: '👶', hi: 'baby', size: '', unit: '', pct: 100, born: true });
|
||||||
const hp = $('#heroPlus');
|
const hp = $('#heroPlus');
|
||||||
if (hp) hp.textContent = (ageDays == null ? '' : ageDays + '天');
|
if (hp) hp.textContent = (ageDays == null ? '' : ageDays + '天');
|
||||||
const hd = $('#heroDays');
|
const hd = $('#heroDays');
|
||||||
@@ -1643,7 +1644,7 @@
|
|||||||
const arN = $('#arTitleName'); if (arN) arN.textContent = nm;
|
const arN = $('#arTitleName'); if (arN) arN.textContent = nm;
|
||||||
const arL1 = $('#arLine1'); if (arL1) arL1.textContent = ageTxt;
|
const arL1 = $('#arLine1'); if (arL1) arL1.textContent = ageTxt;
|
||||||
const arD = $('#arDays'); if (arD) arD.textContent = (ageDays == null ? '--' : ageDays);
|
const arD = $('#arDays'); if (arD) arD.textContent = (ageDays == null ? '--' : ageDays);
|
||||||
const arArt = $('#arSizeArt'); if (arArt) arArt.textContent = '👶';
|
setHandIco($('#arSizeArt'), 'baby', '👶');
|
||||||
const arL2 = $('#arLine2'); if (arL2) arL2.textContent = '孕期陪伴已结束,继续记录宝宝的成长';
|
const arL2 = $('#arLine2'); if (arL2) arL2.textContent = '孕期陪伴已结束,继续记录宝宝的成长';
|
||||||
const arP = $('#arPct'); if (arP) arP.textContent = '100%';
|
const arP = $('#arPct'); if (arP) arP.textContent = '100%';
|
||||||
setArBar(100);
|
setArBar(100);
|
||||||
@@ -1686,7 +1687,7 @@
|
|||||||
$('#heroPlus').textContent = '';
|
$('#heroPlus').textContent = '';
|
||||||
$('#heroDays').textContent = '--';
|
$('#heroDays').textContent = '--';
|
||||||
$('#heroWho').textContent = nm;
|
$('#heroWho').textContent = nm;
|
||||||
setHero({ due: '填好预产期,开启倒计时', emoji: '🌱', size: '', pct: 0 });
|
setHero({ due: '填好预产期,开启倒计时', emoji: '🌱', hi: 'sprout', size: '', pct: 0 });
|
||||||
/* ③ 档案页 → 占位 */
|
/* ③ 档案页 → 占位 */
|
||||||
$('#arTitleName').textContent = nm;
|
$('#arTitleName').textContent = nm;
|
||||||
$('#arLine1').textContent = '完善孕期信息后开启';
|
$('#arLine1').textContent = '完善孕期信息后开启';
|
||||||
@@ -1780,7 +1781,7 @@
|
|||||||
const sz = babySize(week);
|
const sz = babySize(week);
|
||||||
setHero({
|
setHero({
|
||||||
due: left > 0 ? '距离见面还有 <b>' + left + '</b> 天' : '宝宝随时会来见你',
|
due: left > 0 ? '距离见面还有 <b>' + left + '</b> 天' : '宝宝随时会来见你',
|
||||||
emoji: sz.emoji, size: '像' + sz.name.replace(/^一[个颗根只串把粒条棵颗]/, ''), pct: pct
|
emoji: sz.emoji, hi: window.handIcons && (handIcons.week(week) || {}).id, size: '像' + sz.name.replace(/^一[个颗根只串把粒条棵颗]/, ''), pct: pct
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
animateRings($('#screen-home'));
|
animateRings($('#screen-home'));
|
||||||
@@ -1797,7 +1798,7 @@
|
|||||||
换成「这周宝宝多大了」——「还有 110 天」是抽象数字,「像一根玉米」摸得着。
|
换成「这周宝宝多大了」——「还有 110 天」是抽象数字,「像一根玉米」摸得着。
|
||||||
预产期没丢:我的页 #pcSub 和海报上仍是全写法。 */
|
预产期没丢:我的页 #pcSub 和海报上仍是全写法。 */
|
||||||
const S = babySize(week);
|
const S = babySize(week);
|
||||||
$('#arSizeArt').textContent = S.emoji;
|
setHandIco($('#arSizeArt'), window.handIcons && (handIcons.week(week) || {}).id, S.emoji);
|
||||||
$('#arLine2').textContent = '像' + S.name + '了 · 约 ' + S.txt;
|
$('#arLine2').textContent = '像' + S.name + '了 · 约 ' + S.txt;
|
||||||
$('#arPct').textContent = pct + '%';
|
$('#arPct').textContent = pct + '%';
|
||||||
/* 孕程从 84px 的圆环换成了通栏细条,所以这里不再是 setRing,
|
/* 孕程从 84px 的圆环换成了通栏细条,所以这里不再是 setRing,
|
||||||
|
|||||||
@@ -4862,3 +4862,7 @@ a.skip:focus{left:16px;top:16px}
|
|||||||
.pt-float img{width:1.4em;height:1.4em}
|
.pt-float img{width:1.4em;height:1.4em}
|
||||||
.pt-chip i img{width:1.5em;height:1.5em}
|
.pt-chip i img{width:1.5em;height:1.5em}
|
||||||
.pt-ico img{width:1.3em;height:1.3em}
|
.pt-ico img{width:1.3em;height:1.3em}
|
||||||
|
|
||||||
|
/* 头图进度条小水果 / 档案页宝宝大小也换手绘图标(2026-10-12):圆底不变,图标按圆的大小放 */
|
||||||
|
.hi-knob img{display:block;width:15px;height:15px;object-fit:contain;pointer-events:none}
|
||||||
|
.ar-size img{display:block;width:32px;height:32px;object-fit:contain;pointer-events:none}
|
||||||
|
|||||||
Reference in New Issue
Block a user