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

@@ -64,7 +64,7 @@ button{font:inherit;border:0;background:none;color:inherit;cursor:pointer}
(function () {
'use strict';
var $ = function (s) { return document.querySelector(s); };
function href(u) { return u + (location.search || '') + (location.hash || ''); }
function href(u, cm) { return u + (cm ? (location.search ? location.search + '&' : '?') + 'calc=1' : (location.search || '')) + (location.hash || ''); } /* cm:产假页进计算器模式(11-03) */
function esc(s) { return String(s == null ? '' : s).replace(/[&<>"]/g, function (c) { return { '&': '&amp;', '<': '&lt;', '>': '&gt;', '"': '&quot;' }[c]; }); }
/* 人数口径同首页:「此刻」总人数(默认 151 万)× 固定比例,模拟数(AGENTS.md 12b) */
var TOT = 1510000;
@@ -77,13 +77,13 @@ button{font:inherit;border:0;background:none;color:inherit;cursor:pointer}
};
var L = [
{ n: '生娃花费计算器', tag: '最多人用', d: '产检、分娩、月子、宝宝第一年,一共要花多少钱', u: '../huafei/', heat: .118, c: '#F07A2E', bg: '#FFF0E4', ic: SV.money },
{ n: '产假天数计算器', d: '能休几天、哪天开始休、哪天回去上班', u: '../zhichang/', heat: .062, c: '#5B6CFF', bg: '#EEF0FF', ic: SV.cal },
{ n: '产假天数计算器', d: '能休几天、哪天开始休、哪天回去上班', u: '../zhichang/', cm: 1, heat: .062, c: '#5B6CFF', bg: '#EEF0FF', ic: SV.cal },
{ n: '胎儿体重估算', d: '填 B 超上的几个数,估宝宝现在多重', u: '/taier-guzhong/', heat: .071, c: '#2E9B78', bg: '#E6F6F0', img: '/upload/picture/715333a69fb67d8812ab093f342fa00f.png', gate: 15 },
{ n: '孕期增重计算', d: '按孕前身高体重,算你整个孕期该长多少斤', u: '/yunqi-tizhong/', heat: .083, c: '#E25C7A', bg: '#FFECEF', img: '/upload/picture/a6d7e61edee2ff0395cf00587a7c4036.svg' }
];
$('#list').innerHTML = L.map(function (x, i) {
var lk = x.gate && week && week < x.gate;
return '<a class="it' + (lk ? ' lk' : '') + '" data-i="' + i + '" href="' + esc(href(x.u)) + '" style="--c:' + x.c + ';--bg:' + x.bg + '">' +
return '<a class="it' + (lk ? ' lk' : '') + '" data-i="' + i + '" href="' + esc(href(x.u, x.cm)) + '" style="--c:' + x.c + ';--bg:' + x.bg + '">' +
'<span class="ic">' + (x.img ? '<img src="' + esc(x.img) + '" alt="">' : x.ic) + '</span>' +
'<span class="tx"><b>' + esc(x.n) + (x.tag ? '<i>' + esc(x.tag) + '</i>' : '') + (lk ? '<i>孕' + x.gate + '周开放</i>' : '') + '</b><p>' + esc(x.d) + '</p><small>' + wan(TOT * x.heat) + '人算过</small></span>' +
'<span class="go">去算</span></a>';