v26110262 预览:没记录不出数据卡;首页广场头像 10 个;广场顶部去掉测一测(测试列表只从百宝箱进)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
(function () {
|
||||
'use strict';
|
||||
/* 页面版本号(YYMMDD+序号):显示在「关于兜爸心选」页底部;bump 时同步 head 注释与 ?v= */
|
||||
var VER = '26110261';
|
||||
var VER = '26110262';
|
||||
const $ = (s, c) => (c || document).querySelector(s);
|
||||
const $$ = (s, c) => Array.from((c || document).querySelectorAll(s));
|
||||
|
||||
@@ -575,7 +575,9 @@
|
||||
function renderVitals() {
|
||||
const box = $('#vitals'), more = $('#vtMore');
|
||||
if (!box) return;
|
||||
if (!htVtOn()) { box.classList.add('hide'); return; }
|
||||
/* 11-03 用户:「没用过孕期工具,记录数据那块先不显示;用了才显示」→ 没真实记录不再出 4 张示例卡,连同上面那行说明一起藏 */
|
||||
const note = $('.dock-note'), noteShow = v => { if (note) note.style.display = v ? '' : 'none'; };
|
||||
if (!htVtOn()) { box.classList.add('hide'); noteShow(false); return; }
|
||||
const its = {};
|
||||
$$('.vt-it[data-vt]', box).forEach(it => { its[it.dataset.vt] = it; });
|
||||
const ord = k => VT_ORDER.indexOf(k);
|
||||
@@ -587,7 +589,7 @@
|
||||
return (tb - ta) || (ord(a) - ord(b));
|
||||
});
|
||||
} else {
|
||||
keys = VT_ORDER.slice(0, 4).filter(k => !stageLocked(STAGE_GATE.find(g => g.id === VT_TOOL[k])));
|
||||
keys = []; /* 11-03 前:没记录时出胎动 / 体重 / 血压 / 血糖 4 张示例数卡 */
|
||||
}
|
||||
/* 11-01 数据卡改成一行横滑小卡 → 不再折叠,有几项出几项 */
|
||||
const fold = false;
|
||||
@@ -601,6 +603,7 @@
|
||||
more.innerHTML = (vtOpen ? '收起' : '展开全部 ' + keys.length + ' 项数据') + '<svg viewBox="0 0 12 12" aria-hidden="true"><path d="M2.5 4.5L6 8l3.5-3.5" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"/></svg>';
|
||||
}
|
||||
box.classList.toggle('hide', !vis.length);
|
||||
noteShow(vis.length > 0);
|
||||
}
|
||||
(function () { const m = $('#vtMore'); if (m) m.addEventListener('click', e => { e.stopPropagation(); vtOpen = !vtOpen; renderVitals(); haptic(); }); })();
|
||||
/* 原「首页工具卡按孕周换替补」入口(markStageLocks 调):现在替补并进 htDefault,这里只重排 */
|
||||
|
||||
Reference in New Issue
Block a user