v26110270 预览:广场 179 篇标题正文去 AI 味重写;首页倒计时「距离见面」移到天数前;百宝箱下方改便签墙;首页支持 ?go=me / ?go=rec 直达

Co-Authored-By: AI 助手
This commit is contained in:
deploy
2026-11-03 23:18:03 +00:00
parent 25b307e020
commit 575cfe8304
14 changed files with 437 additions and 396 deletions

View File

@@ -320,8 +320,8 @@ mark{background:linear-gradient(transparent 62%,var(--c20) 0);color:inherit;padd
</div>
<div class="toast" id="toast"></div>
<script src="meta.js?v=26110269"></script>
<script src="tests.js?v=26110269"></script>
<script src="meta.js?v=26110270"></script>
<script src="tests.js?v=26110270"></script>
<script>
(function () {
'use strict';

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

View File

@@ -682,10 +682,10 @@ button{font:inherit;color:inherit;border:0;background:none;padding:0;cursor:poin
<div id="sheet" role="dialog" aria-modal="true"><i class="sg"></i><div class="sbd" id="sbd"></div></div>
<div class="toast" id="toast"></div>
<script src="topics.js?v=26110269"></script>
<script src="data.js?v=26110269"></script>
<script src="feed.js?v=26110269"></script>
<script src="ceshi/meta.js?v=26110269"></script>
<script src="topics.js?v=26110270"></script>
<script src="data.js?v=26110270"></script>
<script src="feed.js?v=26110270"></script>
<script src="ceshi/meta.js?v=26110270"></script>
<script>
(function () {
'use strict';
@@ -751,7 +751,7 @@ button{font:inherit;color:inherit;border:0;background:none;padding:0;cursor:poin
var CMD = null, CMERR = false;
/* 头像编码:数字 = av/NNNN.webp(旧代码头像);'av:c012' = av/c012.webp(卡通/可爱卡通);'/…' = 站内绝对路径(内置头像库 /_bridge/avatars/);其余 = assets/img/mom/xxx.jpg */
var avP = function (a) { return typeof a === 'number' ? 'av/' + ('000' + a).slice(-4) + '.webp' : a.indexOf('av:') === 0 ? 'av/' + a.slice(3) + '.webp' : a.charAt(0) === '/' ? a : '../assets/img/mom/' + a + '.jpg'; };
fetch('cm.json?v=26110269').then(function (r) { return r.json(); }).then(function (j) {
fetch('cm.json?v=26110270').then(function (r) { return r.json(); }).then(function (j) {
CMD = j; if (openId && NBY[openId]) { renderComments(NBY[openId]); syncBar(NBY[openId]); }
}).catch(function () { CMERR = true; if (openId && NBY[openId]) renderComments(NBY[openId]); });
function commentsOf(n) {

View File

@@ -105,7 +105,7 @@ main{padding:6px 16px 0}
</div>
<div class="wb"><button type="button" id="write"><svg class="ic" viewBox="0 0 24 24"><path d="M12 20h9M16.5 3.5a2.1 2.1 0 013 3L7 19l-4 1 1-4z"/></svg>写新的故事</button></div>
<script src="../topics.js?v=26110269"></script>
<script src="../topics.js?v=26110270"></script>
<script>
(function () {
'use strict';

View File

@@ -7,10 +7,10 @@
<meta name="mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-capable" content="yes">
<title>兜爸心选 · 孕育陪伴</title>
<!-- V:26110269 缓存版本标记:改 css/js 时同步 bump 该值(与 js/app.js 的 VER 同源),静态资源按 mtime 走 ETag 自动刷新 -->
<!-- V:26110270 缓存版本标记:改 css/js 时同步 bump 该值(与 js/app.js 的 VER 同源),静态资源按 mtime 走 ETag 自动刷新 -->
<link rel="stylesheet" href="mama-box.css">
<link rel="stylesheet" href="night.css">
<link rel="stylesheet" href="js/hero-cd.css?v=26110269">
<link rel="stylesheet" href="js/hero-cd.css?v=26110270">
<!-- 夜晚模式:首屏绘制前就按上次的选择加 class,避免先白后黑闪一下(开关在首页右上角 #nightBtn,逻辑见 app.js) -->
<script>try{if(localStorage.getItem('mmbox.night.v1')==='1'){document.documentElement.classList.add('night');document.querySelector('meta[name=theme-color]').content='#2A2340'}}catch(e){}</script>
<script src="https://res.wx.qq.com/open/js/jweixin-1.6.0.js"></script>
@@ -2559,17 +2559,17 @@
<script src="/_bridge/avatar-picker.js?v=26101105"></script>
<script src="/_bridge/hand-icons.js?v=26101202"></script>
<script src="js/zodiac-art.js"></script>
<script src="guangchang/topics.js?v=26110269"></script>
<script src="guangchang/topics.js?v=26110270"></script>
<script src="js/app.js"></script>
<script src="js/hero-cd.js?v=26110269"></script>
<script src="js/kit.js?v=26110269"></script>
<script src="js/hero-cd.js?v=26110270"></script>
<script src="js/kit.js?v=26110270"></script>
<script>
/* 11-02 首页「孕妈广场」效果稿:地址带 ?gcv=1~6 时,把 #gcHome 换成 demo/gch/vN.css + vN.js 的版式并滚到这一块。
11-02 用户:「用第一版,放到预览页面上」;后改定彩色卡 → 不带参数也默认用 V6 合并版(广场卡堆 + 其他妈妈也在搜 + 测一测第 4 版彩色卡),不滚动、不显示效果稿角标 */
(function () {
var m = location.search.match(/[?&]gcv=([1-6])(?:&|$)/);
if (!m) window.__gcDefault = 1;
var n = m ? m[1] : '6', l = document.createElement('link'), s = document.createElement('script'), q = m ? Date.now() : 'v=26110269';
var n = m ? m[1] : '6', l = document.createElement('link'), s = document.createElement('script'), q = m ? Date.now() : 'v=26110270';
var dir = n === '4' || n === '6' ? 'js/gch/' : 'demo/gch/'; /* 11-03 上正式:定稿 V6(含它套的 V4)并进 js/gch/,其余效果稿仍在 demo/ */
l.rel = 'stylesheet'; l.href = dir + 'v' + n + '.css?' + q;
s.src = dir + 'v' + n + '.js?' + q;
@@ -2578,7 +2578,7 @@
/* 11-02 品牌露出(用户定 4 处都要):默认加载,?brand=0 可关掉对比;11-03 已并进 js/gch/ */
if (!/[?&]brand=0/.test(location.search)) {
var bl = document.createElement('link'), bs = document.createElement('script');
bl.rel = 'stylesheet'; bl.href = 'js/gch/brand.css?v=26110269'; bs.src = 'js/gch/brand.js?v=26110269';
bl.rel = 'stylesheet'; bl.href = 'js/gch/brand.css?v=26110270'; bs.src = 'js/gch/brand.js?v=26110270';
document.head.appendChild(bl); document.body.appendChild(bs);
}
})();
@@ -2589,7 +2589,7 @@
<script src="js/hero-fx.js"></script>
<!-- 2026-10-05 首页头图:宝宝时不时动一动小手小脚(独立文件,删掉这一行即下线) -->
<script src="js/baby-limbs.js?v=26101201"></script>
<script src="js/coach.js?v=26110269"></script>
<script src="js/coach.js?v=26110270"></script>
<script src="js/birth-flow.js?v=26110201"></script>
<!-- 禁止下拉回弹(2026-10-11 统一规则,与孕期体重同一段):竖向拖动时从手指下往上找还能朝该方向滚的容器,找不到才拦;横滑、双指、可滚列表不受影响 -->

View File

@@ -3,7 +3,7 @@
(function () {
'use strict';
/* 页面版本号(YYMMDD+序号):显示在「关于兜爸心选」页底部;bump 时同步 head 注释与 ?v= */
var VER = '26110269';
var VER = '26110270';
const $ = (s, c) => (c || document).querySelector(s);
const $$ = (s, c) => Array.from((c || document).querySelectorAll(s));
@@ -863,6 +863,19 @@
const fq = $('#fpQifu');
if (fq) fq.addEventListener('click', e => { e.preventDefault(); e.stopPropagation(); jumpApp(QIFU_URL); });
$$('[data-sheet="close"]').forEach(b => b.addEventListener('click', closeSheet));
/* 11-03 档案页(/chengzhang-dangan/)底部也放首页这排 tab:那边点「我的」「记一下」回到首页并直达 —— 带 ?go=me / ?go=rec 进来。
用完就从地址里去掉,刷新不会重复弹。 */
{
const sp = new URLSearchParams(location.search), gv = sp.get('go');
if (gv === 'me' || gv === 'rec') {
sp.delete('go');
const qs = sp.toString();
try { history.replaceState(history.state, '', location.pathname + (qs ? '?' + qs : '') + location.hash); } catch (e) {}
window.__mbDeepAt = Date.now(); /* 首次 pageshow 会把屏重置回首页(resetScreenOnShow),刚直达的这一下要放过 */
requestAnimationFrame(() => { if (gv === 'me') go('me'); else openSheet(); });
}
}
scrim.addEventListener('click', closeSheet);
/* 下拉关闭 */
@@ -6556,6 +6569,7 @@
SPA 还停留在切走前的屏(如「我的」),与"回到首页"的预期不符。
只在"当前不是首页"时才切,避免打断用户在首页上的浏览/滚动。 */
function resetScreenOnShow() {
if (window.__mbDeepAt && Date.now() - window.__mbDeepAt < 3000) return; /* ?go=me 直达后的首次 pageshow 不重置 */
var cur = document.querySelector('.screen.is-active');
if (cur && cur.dataset.screen && cur.dataset.screen !== 'home') go('home');
}

View File

@@ -231,5 +231,5 @@
}
/* feed.js 首页默认不加载(index.html 只引了 topics.js),这里按需拉一次 */
if (window.GC_FEED) init();
else { var fs = document.createElement('script'); fs.src = 'guangchang/feed.js?v=26110269'; fs.onload = fs.onerror = init; document.body.appendChild(fs); }
else { var fs = document.createElement('script'); fs.src = 'guangchang/feed.js?v=26110270'; fs.onload = fs.onerror = init; document.body.appendChild(fs); }
})();

View File

@@ -6,9 +6,9 @@
(function () {
var sec = document.getElementById('gcHome');
if (!sec) return;
var l = document.createElement('link'); l.rel = 'stylesheet'; l.href = 'js/gch/v4.css?v=26110269';
var l = document.createElement('link'); l.rel = 'stylesheet'; l.href = 'js/gch/v4.css?v=26110270';
document.head.appendChild(l);
var s = document.createElement('script'); s.src = 'js/gch/v4.js?v=26110269';
var s = document.createElement('script'); s.src = 'js/gch/v4.js?v=26110270';
s.onload = function () { if (sec.querySelector('.g4-foot')) merge(); else sec.addEventListener('gc4-ready', merge, { once: true }); }; /* v4 要先拉 feed.js 才渲染 */
document.body.appendChild(s);

View File

@@ -1,12 +1,13 @@
/* 首页头图倒计时(11-03,见 js/hero-cd.js)。只在 .hero-pane.cd 时生效;关掉(未填预产期 / 已出生)就是原来的样子。
竖向:小标 18 → 数字牌 46 → 时分秒 20 → 孕周一行 20 → 进度条 16,加间距后和旧版总高一样,下面「我的孕期工具」卡不会被顶下去。 */
竖向(11-03 二改):「距离见面」竖排挪到数字牌左边、不再单占一行 → 数字牌 46 → 时分秒 20 → 孕周一行 20 → 进度条 16;
省下的一行高度给孕周和进度条往下挪(用户:「跟上面的天数上下有一点距离」)。整组仍在头图里,下面卡片位置不变。 */
.hi-cd{display:none}
.hero-pane.cd{margin-top:2px}
.hero-pane.cd{margin-top:14px}
.hero-pane.cd .hi-due{display:none}
.hero-pane.cd .hi-cd{display:flex;flex-direction:column;align-items:flex-start}
.cd-lb{display:inline-flex;align-items:center;gap:5px;height:18px;font-size:12.5px;font-weight:700;color:#fff;letter-spacing:.5px;white-space:nowrap}
.cd-lb svg{width:12px;height:12px;color:#FFD9C7;animation:hiBeat 1.6s ease-in-out infinite}
.cd-row{display:flex;align-items:flex-end;gap:6px;margin-top:5px}
.cd-lb{display:flex;flex-direction:column;justify-content:center;gap:3px;height:46px;margin-right:2px}
.cd-lb b{font-size:13px;font-weight:800;line-height:1;color:#fff;letter-spacing:1px;white-space:nowrap}
.cd-row{display:flex;align-items:flex-end;gap:6px}
.cd-d{display:flex;gap:4px}
/* 一位一块牌:上半亮、下半略暗,中间一道翻页缝 + 两侧小铆点,像机场翻牌钟 */
.cd-d i{position:relative;display:block;width:34px;height:46px;border-radius:9px;font-style:normal;
@@ -26,11 +27,11 @@
.cd-tk b{min-width:22px;height:20px;padding:0 3px;border-radius:5px;background:rgba(110,35,18,.24);color:#fff;font-size:12.5px;font-weight:800;line-height:20px;text-align:center;font-variant-numeric:tabular-nums;text-shadow:none}
.cd-tk i{margin:0 3px 0 1px;font-style:normal;font-size:11px;font-weight:700;color:#FFE6BF}
/* 孕周退成一行小字「孕 26 周 +6天」,不再和倒计时抢主角 */
.hero-pane.cd .hi-week{height:20px;margin-top:5px;align-items:center}
.hero-pane.cd .hi-week{height:20px;margin-top:16px;align-items:center}
.hero-pane.cd .hi-week::before{content:"孕";margin-right:3px;font-size:13px;font-weight:800;color:#FFE6BF}
.hero-pane.cd .hi-week b{font-size:17px;line-height:20px;letter-spacing:0;text-shadow:0 1px 3px rgba(120,30,10,.28)}
.hero-pane.cd .hi-unit{flex-direction:row;align-items:center;margin:0 0 0 3px}
.hero-pane.cd .hi-unit em{font-size:13px}
.hero-pane.cd .hi-unit span{margin:0 0 0 5px;padding:0 6px;font-size:10.5px;line-height:16px}
.hero-pane.cd .hi-prog{margin-top:5px}
@media (prefers-reduced-motion:reduce){.cd-d i.flip span,.cd-lb svg{animation:none}}
.hero-pane.cd .hi-prog{margin-top:9px}
@media (prefers-reduced-motion:reduce){.cd-d i.flip span{animation:none}}

View File

@@ -8,8 +8,8 @@
var cur = '', timer = 0;
var p2 = function (n) { return (n < 10 ? '0' : '') + n; };
box.innerHTML =
'<span class="cd-lb"><svg viewBox="0 0 24 24" aria-hidden="true"><path d="M12 21s-8-5-8-11a4.5 4.5 0 018-2.8A4.5 4.5 0 0120 10c0 6-8 11-8 11z" fill="currentColor"/></svg>距离和宝宝见面还有</span>' +
'<div class="cd-row"><span class="cd-d" id="heroCdD"></span><em>天</em></div>' +
/* 11-03 二改(用户:「距离见面」四个字放到天数前面)→ 竖排两行「距离 / 见面」贴在数字牌左边,原来单独一行的小标去掉 */
'<div class="cd-row"><span class="cd-lb"><b>距离</b><b>见面</b></span><span class="cd-d" id="heroCdD"></span><em>天</em></div>' +
'<div class="cd-tk"><b id="heroCdH">--</b><i>时</i><b id="heroCdM">--</b><i>分</i><b id="heroCdS">--</b><i>秒</i></div>';
var D = document.getElementById('heroCdD'), H = document.getElementById('heroCdH'), M = document.getElementById('heroCdM'), S = document.getElementById('heroCdS');
function tick() {

View File

@@ -38,3 +38,21 @@ html.night .kit-e span{color:#B9A9B2}
html.night .kit-e{background:rgba(255,255,255,.06);box-shadow:none}
html.night .kit-e img{mix-blend-mode:normal}
html.night .kit-lh{border-color:rgba(255,255,255,.1)}
/* 11-03 下方 6 条改「便签墙」(见 kit.js paint 注释) */
.kit-notes{display:grid;grid-template-columns:1fr 1fr;gap:16px 12px;padding:14px 2px 6px}
.kn{position:relative;display:flex;flex-direction:column;gap:8px;min-height:118px;padding:16px 12px 11px;border-radius:6px 16px 16px 16px;text-decoration:none;color:inherit;
background:var(--kb);box-shadow:0 8px 16px -10px var(--ks),0 1px 0 rgba(255,255,255,.7) inset;transform:rotate(var(--r));transition:transform .2s}
.kn:active{transform:rotate(0) scale(.97)}
.kn.t-qz{--kb:linear-gradient(160deg,#F5F0FF,#EBE3FF);--ks:rgba(124,92,252,.55);--kc:#7C5CFC}
.kn.t-qa{--kb:linear-gradient(160deg,#EEFAF4,#DDF3E8);--ks:rgba(46,155,120,.5);--kc:#2E9B78}
.kn.t-js{--kb:linear-gradient(160deg,#FFF6EC,#FFE8D3);--ks:rgba(240,122,46,.5);--kc:#E86F22}
.kn-tape{position:absolute;left:50%;top:-7px;width:46px;height:14px;margin-left:-23px;border-radius:2px;background:rgba(255,255,255,.72);box-shadow:0 1px 2px rgba(0,0,0,.06);transform:rotate(calc(var(--r) * -2))}
.kn-tg{display:inline-flex;align-items:center;gap:3px;align-self:flex-start;height:20px;padding:0 7px 0 5px;border-radius:99px;background:rgba(255,255,255,.75);color:var(--kc);font-size:11px;font-weight:800}
.kn-tg svg{width:12px;height:12px}
.kn-q{flex:1;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden;font-size:14px;font-weight:800;line-height:1.45;color:#2A1E1E}
.kn-n{display:flex;align-items:center;gap:2px;font-size:11px;font-weight:600;color:#9A8783}
.kn-n svg{width:11px;height:11px;color:#FF6A3D}
.kn-n b{font-size:12px;font-weight:900;color:var(--kc);font-variant-numeric:tabular-nums}
html.night .kn{background:#2F2737;box-shadow:none}
html.night .kn-q{color:#F1E6EE}
html.night .kn-tg{background:rgba(255,255,255,.08)}

View File

@@ -9,7 +9,7 @@
if (/[?&]kit=0(?:&|$)/.test(location.search)) return;
var box = document.getElementById('kit'), sec = document.getElementById('kitHome');
if (!box || !sec) return;
var V = '26110269';
var V = '26110270';
var l = document.createElement('link'); l.rel = 'stylesheet'; l.href = 'js/kit.css?v=' + V; document.head.appendChild(l);
document.documentElement.classList.add('has-kit');
@@ -93,14 +93,22 @@
return { r: r, wk: wk };
}
var TAG = { qz: '测试', qa: '百问', js: '计算器' };
var KN_IC = {
qz: '<svg viewBox="0 0 24 24" aria-hidden="true"><path d="M9 3h6M10 3v6l-5 9a2 2 0 001.8 3h10.4a2 2 0 001.8-3l-5-9V3" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/></svg>',
qa: '<svg viewBox="0 0 24 24" aria-hidden="true"><path d="M4 5h16v11H9l-5 4z" fill="none" stroke="currentColor" stroke-width="2" stroke-linejoin="round"/><path d="M10 9.5a2 2 0 113 1.7c-.6.4-1 .8-1 1.5M12 14.5h.01" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round"/></svg>',
js: '<svg viewBox="0 0 24 24" aria-hidden="true"><rect x="5" y="3" width="14" height="18" rx="2.5" fill="none" stroke="currentColor" stroke-width="2"/><path d="M8.5 7h7M8.5 12h.01M12 12h.01M15.5 12h.01M8.5 16h.01M12 16h.01M15.5 16h.01" stroke="currentColor" stroke-width="2.2" stroke-linecap="round"/></svg>'
};
function paint() {
nums();
var d = rows(), L = box.querySelector('.kit-list');
box.querySelector('.kit-wk').textContent = d.wk ? '孕 ' + d.wk + ' 周' : '';
/* 11-03 用户:「这 6 条跟下面孕妈广场那 6 条太像,换个有创意的形式」→ 便签墙:两列六张小便签,按类型配色(测试紫 / 百问绿 / 计算器橙),
顶上一条半透明胶带、左右轻微歪一点,角上类型小章,问题写大、人数放底下。不再用编号列表。 */
L.className = 'kit-list kit-notes';
L.innerHTML = d.r.map(function (x, i) {
return '<a class="ms-it ripple kit-it" href="' + esc(x.href) + '"><i class="ms-no">' + (i + 1) + '</i>' +
'<span class="ms-m"><span class="ms-q">' + esc(x.q) + '</span><span class="ms-h">' + FIRE + '<b>' + wan(x.n) + x.u + '</b></span></span>' +
'<span class="kit-tg t-' + x.c + '">' + TAG[x.c] + '</span><i class="ms-go">›</i></a>';
return '<a class="kn ripple t-' + x.c + '" href="' + esc(x.href) + '" style="--r:' + ([-1.6, 1.2, 1.4, -1.1, -1.3, 1.6][i] || 0) + 'deg">' +
'<i class="kn-tape" aria-hidden="true"></i><span class="kn-tg">' + KN_IC[x.c] + TAG[x.c] + '</span>' +
'<span class="kn-q">' + esc(x.q) + '</span><span class="kn-n">' + FIRE + '<b>' + wan(x.n) + '</b>' + x.u + '</span></a>';
}).join('');
}
fetch('assets/data/qa/hot.json?v=' + V).then(function (r) { return r.ok ? r.json() : []; }).catch(function () { return []; })

View File

@@ -68,7 +68,7 @@
function getJSON(u) { return fetch(u, { cache: 'no-cache' }).then(function (r) { if (!r.ok) throw r.status; return r.json(); }); }
function related(box) {
getJSON('../_shared/idx.json?v=26110269').then(function (idx) {
getJSON('../_shared/idx.json?v=26110270').then(function (idx) {
var me = null; idx.forEach(function (x) { if (x[0] === SLUG) me = x; });
var tag = me ? me[2] : '', h = 0; for (var i = 0; i < SLUG.length; i++) h = (h * 31 + SLUG.charCodeAt(i)) >>> 0;
var rest = idx.filter(function (x) { return x[0] !== SLUG; });
@@ -175,7 +175,7 @@
}
fetch(API + '/comments?kind=topic&target=' + encodeURIComponent(SLUG) + (OID ? '&openid=' + encodeURIComponent(OID) : ''))
.then(function (r) { return r.json(); }).then(function (j) { if (j && j.code === 200) { RC = j.result; paint(); } }).catch(function () {});
getJSON('../_shared/cm/' + SLUG + '.json?v=26110269').then(function (d) { L = d.c || []; paint(); }).catch(function () { paint(); });
getJSON('../_shared/cm/' + SLUG + '.json?v=26110270').then(function (d) { L = d.c || []; paint(); }).catch(function () { paint(); });
}
function extras(el) {