测一测:12 种好物玩家类型图改为代码绘制的徽章插画;趣味心理改彩色问句卡、趣味闯关改关卡路线(不再堆插画);6 种类型结果改双列占比条;v26110221

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
deploy
2026-11-02 12:05:27 +00:00
parent 4be3d20275
commit a5128c4a19
17 changed files with 49 additions and 33 deletions

View File

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

Binary file not shown.

Before

Width:  |  Height:  |  Size: 25 KiB

After

Width:  |  Height:  |  Size: 7.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 35 KiB

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 22 KiB

After

Width:  |  Height:  |  Size: 8.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 27 KiB

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 25 KiB

After

Width:  |  Height:  |  Size: 9.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 27 KiB

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 30 KiB

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 35 KiB

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 28 KiB

After

Width:  |  Height:  |  Size: 7.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 28 KiB

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 24 KiB

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 28 KiB

After

Width:  |  Height:  |  Size: 9.9 KiB

View File

@@ -323,7 +323,7 @@ mark{background:linear-gradient(transparent 62%,var(--c20) 0);color:inherit;padd
</div>
<div class="toast" id="toast"></div>
<script src="tests.js?v=26110220"></script>
<script src="tests.js?v=26110221"></script>
<script>
(function () {
'use strict';
@@ -527,7 +527,7 @@ mark{background:linear-gradient(transparent 62%,var(--c20) 0);color:inherit;padd
$('#rTags').innerHTML = tags.map(function (x) { return '<span>' + esc(x) + '</span>'; }).join('');
if (isType) {
var sorted = R.slice().sort(function (a, b) { return (b === r) - (a === r) || res.pc[b.k] - res.pc[a.k]; });
$('#rDims').innerHTML = (R.length <= 6 ? radarSVG() : '') + '<div class="dl' + (R.length > 6 ? ' wide' : '') + '">' + sorted.map(function (x) {
$('#rDims').innerHTML = (R.length <= 5 ? radarSVG() : '') + '<div class="dl' + (R.length > 5 ? ' wide' : '') + '">' + sorted.map(function (x) {
return '<div class="dr' + (x === r ? ' me' : '') + '"><span>' + esc(x.title) + '</span><span class="p num">' + res.pc[x.k] + '%</span><span class="tr"><i data-w="' + res.pc[x.k] + '"></i></span></div>';
}).join('') + '</div>';
} else {

View File

@@ -165,20 +165,34 @@ button{font:inherit;color:inherit;border:0;background:none;padding:0;cursor:poin
.csn small em{font-style:normal;color:var(--tg);font-weight:700}
.csn .ar{flex:none;color:#D9C3BC}.csn .ar .ic{width:15px;height:15px;stroke-width:2.4}
.csp{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-top:10px}
.cst{position:relative;display:block;padding:8px 8px 11px;border-radius:20px;background:linear-gradient(180deg,var(--tl),#fff 70%);text-align:left;box-shadow:0 6px 16px -12px var(--tg)}
.cst img{display:block;width:100%;aspect-ratio:4/3;border-radius:15px;object-fit:cover;object-position:center 28%}
.cst i{position:absolute;top:14px;left:14px;height:20px;padding:0 8px;border-radius:99px;background:var(--tg);color:#fff;font-size:11px;font-style:normal;font-weight:800;line-height:20px}
.cst b{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;margin:8px 4px 0;font-size:14px;font-weight:800;line-height:1.4;color:#2A1E1E;min-height:39px}
.cst small{display:block;margin:2px 4px 0;font-size:11.5px;color:#A08B85;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}
.cst small em{font-style:normal;color:var(--tg);font-weight:700}
.cs-l{display:flex;gap:10px;margin:10px -16px 0;padding:0 16px 6px;overflow-x:auto;scrollbar-width:none;-webkit-overflow-scrolling:touch}
.cs-l::-webkit-scrollbar{display:none}
.csx{position:relative;flex:none;width:236px;height:150px;border-radius:22px;overflow:hidden;text-align:left;background:var(--tl)}
.csx img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;object-position:center 30%}
.csx .tx{position:absolute;left:0;right:0;bottom:0;padding:30px 14px 12px;background:linear-gradient(180deg,rgba(10,60,52,0),rgba(10,60,52,.78));color:#fff}
.csx small{display:inline-block;height:18px;padding:0 7px;border-radius:6px;background:var(--tg);font-size:10.5px;font-weight:800;line-height:18px}
.csx b{display:block;margin-top:5px;font-size:15px;font-weight:900;line-height:1.35;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}
.csx .go{display:block;margin-top:2px;font-size:11.5px;opacity:.9;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}
.cst{--a:#7C5CFC;--b:#F1EDFF;position:relative;display:flex;flex-direction:column;min-height:128px;padding:14px 14px 12px;border-radius:20px;overflow:hidden;text-align:left;background:var(--b)}
.cst.k1{--a:#E96F8F;--b:#FFEAF0}.cst.k2{--a:#2C9C86;--b:#E2F5EF}.cst.k3{--a:#D98A1E;--b:#FFF2DC}.cst.k4{--a:#4F7EE0;--b:#E6EEFF}
.cst.wide{grid-column:1/-1;min-height:0}
.cst.big{grid-column:1/-1;min-height:0;padding:18px 18px 14px;background:linear-gradient(120deg,#8E6BFF,#C07BF0);color:#fff}
.cst .qm{position:absolute;right:-6px;top:-22px;font-style:normal;font-size:118px;font-weight:900;line-height:1;color:var(--a);opacity:.13;font-family:Georgia,serif}
.cst.big .qm{color:#fff;opacity:.2;font-size:150px;right:6px}
.cst b{position:relative;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden;font-size:15px;font-weight:900;line-height:1.42;color:#2A1E1E}
.cst.big b{font-size:19px;color:#fff;padding-right:60px}
.cst small{position:relative;display:block;margin-top:5px;font-size:12px;line-height:1.45;color:#8A7A76}
.cst.big small{color:rgba(255,255,255,.85)}
.cst .ft{position:relative;display:flex;align-items:center;justify-content:space-between;margin-top:auto;padding-top:10px;font-size:12px;font-weight:800;color:var(--a)}
.cst.big .ft{color:#fff}
.cst .ft em{font-style:normal;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}
.cst .ar{flex:none;width:26px;height:26px;border-radius:50%;display:grid;place-items:center;background:#fff;color:var(--a)}
.cst.big .ar{color:#8E6BFF}
.cst .ar .ic{width:13px;height:13px;stroke-width:2.6}
.csm{position:relative;margin-top:10px;padding:4px 0;list-style:none}
.csm::before{content:"";position:absolute;left:27px;top:24px;bottom:24px;border-left:3px dashed var(--tg);opacity:.35}
.csm li+li{margin-top:10px}
.csx{position:relative;display:flex;align-items:center;gap:12px;width:100%;text-align:left}
.csx .nd{position:relative;z-index:1;flex:none;width:56px;height:56px;border-radius:50%;display:flex;align-items:baseline;justify-content:center;padding-top:9px;background:#fff;border:3px solid var(--tg);color:var(--tg);font-size:24px;font-weight:900;line-height:1.2;font-family:Georgia,serif}
.csx .nd small{font-size:10px;font-weight:800;font-family:inherit}
.csx.ok .nd{background:var(--tg);color:#fff}
.csx .tx{flex:1;min-width:0;padding:12px 12px 12px 14px;border-radius:16px;background:#fff;box-shadow:0 3px 12px rgba(170,110,90,.07)}
.csx b{display:block;font-size:14.5px;font-weight:800;line-height:1.4;color:#2A1E1E}
.csx .tx small{display:block;margin-top:1px;font-size:12px;color:#A08B85;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}
.csx.ok .tx small{color:var(--tg);font-weight:700}
.csx .go{position:absolute;right:12px;top:-8px;height:20px;padding:0 9px;border-radius:99px;background:var(--tg);color:#fff;font-size:11px;font-weight:800;line-height:20px;box-shadow:0 4px 10px -4px var(--tg)}
.csn:active,.cst:active,.csx:active{transform:scale(.985)}
.csr{display:flex;align-items:center;gap:12px;width:100%;margin-top:8px;padding:9px 10px 9px 9px;border-radius:18px;background:#fff;text-align:left;box-shadow:0 3px 12px rgba(170,110,90,.07)}
.csr img{flex:none;width:58px;height:58px;border-radius:15px;object-fit:cover;object-position:center 28%;background:var(--tl)}
@@ -576,10 +590,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=26110220"></script>
<script src="data.js?v=26110220"></script>
<script src="feed.js?v=26110220"></script>
<script src="ceshi/meta.js?v=26110220"></script>
<script src="topics.js?v=26110221"></script>
<script src="data.js?v=26110221"></script>
<script src="feed.js?v=26110221"></script>
<script src="ceshi/meta.js?v=26110221"></script>
<script>
(function () {
'use strict';
@@ -787,16 +801,18 @@ button{font:inherit;color:inherit;border:0;background:none;padding:0;cursor:poin
var TGD = { quiz: '有标准答案,答完看解析', psy: '没有对错,测测你是哪一型', game: '挑战一下,看能拿什么称号', shop: '看看你是哪一类育儿采购玩家' };
/* 每组换一种排法,避免整页一个样:考卷=编号卷宗,心理=双列卡,闯关=横滑大卡,好物=图文行 */
function rest(g, l, done) {
if (g === 'psy') return '<div class="csp">' + l.map(function (x) {
if (g === 'psy') return '<div class="csp">' + l.map(function (x, i) {
var d = done[x.id];
return '<button type="button" class="cst" data-test="' + x.id + '"><img src="ceshi/img/' + x.id + '_s.webp" alt="" loading="lazy">' + (d ? '<i>已测</i>' : '') +
'<b>' + esc(x.title) + '</b><small>' + (d ? '<em>' + esc(d.title) + '</em>' : esc(x.sub)) + '</small></button>';
return '<button type="button" class="cst k' + (i % 5) + (i === 0 ? ' big' : i === l.length - 1 && l.length % 2 === 0 ? ' wide' : '') + '" data-test="' + x.id + '"><i class="qm">?</i>' +
'<b>' + esc(x.title) + '</b><small>' + esc(x.sub) + '</small>' +
'<span class="ft">' + (d ? '<em>我是 · ' + esc(d.title) + '</em>' : x.n + ' 题') + '<span class="ar"><svg class="ic"><use href="#i-right"/></svg></span></span></button>';
}).join('') + '</div>';
if (g === 'game') return '<div class="cs-l">' + l.map(function (x) {
if (g === 'game') return '<ol class="csm">' + l.map(function (x, i) {
var d = done[x.id];
return '<button type="button" class="csx" data-test="' + x.id + '"><img src="ceshi/img/' + x.id + '_s.webp" alt="" loading="lazy"><span class="tx"><small>' + x.n + ' 关</small><b>' + esc(x.title) + '</b>' +
'<span class="go">' + (d ? '已拿「' + esc(d.title) + '」' : '去闯关') + '</span></span></button>';
}).join('') + '</div>';
return '<li><button type="button" class="csx' + (d ? ' ok' : '') + '" data-test="' + x.id + '"><span class="nd"><small>第</small>' + (i + 1) + '<small>站</small></span>' +
'<span class="tx"><b>' + esc(x.title) + '</b><small>' + (d ? '已拿称号「' + esc(d.title) + '」' : x.n + ' 关 · ' + esc(x.sub)) + '</small></span>' +
'<span class="go">' + (d ? '再闯' : '开闯') + '</span></button></li>';
}).join('') + '</ol>';
if (g === 'quiz') return '<div class="csq">' + l.map(function (x, i) {
var d = done[x.id];
return '<button type="button" class="csn" data-test="' + x.id + '"><span class="no"><small>NO.</small>' + ('0' + (TM.filter(function (y) { return y.group === 'quiz'; }).indexOf(x) + 1)).slice(-2) + '</span><span class="tx"><b>' + esc(x.title) + '</b>' +

View File

@@ -7,7 +7,7 @@
<meta name="mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-capable" content="yes">
<title>兜爸心选 · 孕育陪伴</title>
<!-- V:26110220 缓存版本标记:改 css/js 时同步 bump 该值(与 js/app.js 的 VER 同源),静态资源按 mtime 走 ETag 自动刷新 -->
<!-- V:26110221 缓存版本标记:改 css/js 时同步 bump 该值(与 js/app.js 的 VER 同源),静态资源按 mtime 走 ETag 自动刷新 -->
<link rel="stylesheet" href="mama-box.css">
<link rel="stylesheet" href="night.css">
<!-- 夜晚模式:首屏绘制前就按上次的选择加 class,避免先白后黑闪一下(开关在首页右上角 #nightBtn,逻辑见 app.js) -->
@@ -2498,7 +2498,7 @@
<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=26110220"></script>
<script src="guangchang/topics.js?v=26110221"></script>
<script src="js/app.js"></script>
<script>
/* 11-02 首页「孕妈广场」效果稿:地址带 ?gcv=1~6 时,把 #gcHome 换成 demo/gch/vN.css + vN.js 的版式并滚到这一块。
@@ -2506,7 +2506,7 @@
(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=26110220';
var n = m ? m[1] : '6', l = document.createElement('link'), s = document.createElement('script'), q = m ? Date.now() : 'v=26110221';
l.rel = 'stylesheet'; l.href = 'demo/gch/v' + n + '.css?' + q;
s.src = 'demo/gch/v' + n + '.js?' + q;
if (m) s.onload = function () { setTimeout(function () { var el = document.getElementById('gcHome'); if (el) el.scrollIntoView({ block: 'center' }); }, 900); };
@@ -2514,7 +2514,7 @@
/* 11-02 品牌露出(用户定 4 处都要):默认加载,?brand=0 可关掉对比;⚠️ 上正式前和 V6 一起并进正式代码,别依赖 demo/ */
if (!/[?&]brand=0/.test(location.search)) {
var bl = document.createElement('link'), bs = document.createElement('script');
bl.rel = 'stylesheet'; bl.href = 'demo/brand/brand.css?v=26110220'; bs.src = 'demo/brand/brand.js?v=26110220';
bl.rel = 'stylesheet'; bl.href = 'demo/brand/brand.css?v=26110221'; bs.src = 'demo/brand/brand.js?v=26110221';
document.head.appendChild(bl); document.body.appendChild(bs);
}
})();

View File

@@ -3,7 +3,7 @@
(function () {
'use strict';
/* 页面版本号(YYMMDD+序号):显示在「关于兜爸心选」页底部;bump 时同步 head 注释与 ?v= */
var VER = '26110220';
var VER = '26110221';
const $ = (s, c) => (c || document).querySelector(s);
const $$ = (s, c) => Array.from((c || document).querySelectorAll(s));