diff --git a/guangchang/ceshi/index.html b/guangchang/ceshi/index.html index 3067fee..49266af 100644 --- a/guangchang/ceshi/index.html +++ b/guangchang/ceshi/index.html @@ -320,8 +320,8 @@ mark{background:linear-gradient(transparent 62%,var(--c20) 0);color:inherit;padd
- - + + - - - + + + + + @@ -2559,17 +2559,17 @@ - + - - + + - + diff --git a/js/app.js b/js/app.js index 6c31d47..ecfe4d8 100644 --- a/js/app.js +++ b/js/app.js @@ -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'); } diff --git a/js/gch/v4.js b/js/gch/v4.js index 01780b6..ecba262 100644 --- a/js/gch/v4.js +++ b/js/gch/v4.js @@ -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); } })(); diff --git a/js/gch/v6.js b/js/gch/v6.js index 2366196..7a1111e 100644 --- a/js/gch/v6.js +++ b/js/gch/v6.js @@ -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); diff --git a/js/hero-cd.css b/js/hero-cd.css index c1a0cd9..0b1ff1c 100644 --- a/js/hero-cd.css +++ b/js/hero-cd.css @@ -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}} diff --git a/js/hero-cd.js b/js/hero-cd.js index b6a6700..044b1e0 100644 --- a/js/hero-cd.js +++ b/js/hero-cd.js @@ -8,8 +8,8 @@ var cur = '', timer = 0; var p2 = function (n) { return (n < 10 ? '0' : '') + n; }; box.innerHTML = - '距离和宝宝见面还有' + - '