测一测:列表、信息流卡、测试开始页显示「N万人测过」模拟人数(AGENTS.md 12b 登记例外,2026-12-31 前复核);v26110224

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
deploy
2026-11-02 12:18:01 +00:00
parent e9ed707c44
commit 1d3eb9de93
8 changed files with 44 additions and 19 deletions

View File

@@ -143,6 +143,9 @@ button{font:inherit;color:inherit;border:0;background:none;padding:0;cursor:poin
.csg-h b{position:relative;font-size:17px;font-weight:900;color:#2A1E1E}
.csg-h b::after{content:"";position:absolute;left:-2px;right:-2px;bottom:1px;height:7px;border-radius:4px;background:var(--tg);opacity:.22;z-index:-1}
.csg-h b{z-index:0}
.pc{display:inline-flex;align-items:center;margin-top:3px;font-size:11px;font-style:normal;font-weight:700;color:#C98A7A}
.csf .pc{display:flex;margin:6px 0 0}
.pc::before{content:"";width:6px;height:6px;margin-right:4px;border-radius:50%;background:#FF8A6B;box-shadow:0 0 0 2px rgba(255,138,107,.2)}
.csg-h small{font-size:12px;color:#A08B85}
.csg-h em{margin-left:auto;font-style:normal;font-size:12px;font-weight:800;color:var(--tg)}
.csf{position:relative;display:flex;align-items:center;gap:12px;width:100%;margin-top:10px;padding:14px 12px 14px 16px;border-radius:22px;overflow:hidden;text-align:left;background:linear-gradient(125deg,var(--tl),#fff 85%);box-shadow:0 8px 20px -14px var(--tg)}
@@ -587,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=26110223"></script>
<script src="data.js?v=26110223"></script>
<script src="feed.js?v=26110223"></script>
<script src="ceshi/meta.js?v=26110223"></script>
<script src="topics.js?v=26110224"></script>
<script src="data.js?v=26110224"></script>
<script src="feed.js?v=26110224"></script>
<script src="ceshi/meta.js?v=26110224"></script>
<script>
(function () {
'use strict';
@@ -791,7 +794,7 @@ button{font:inherit;color:inherit;border:0;background:none;padding:0;cursor:poin
function testCardHTML(x, done) {
var d = done && done[x.id];
return '<button type="button" class="nc tst g-' + x.group + '" data-test="' + x.id + '"><div class="cvw"><img src="ceshi/img/' + x.id + '_s.webp" alt="" loading="lazy">' +
'<span class="tb"><svg class="ic"><use href="#i-spark"/></svg>测一测</span><span class="tq">' + x.n + ' 题 · 约 ' + x.min + ' 分钟</span></div>' +
'<span class="tb"><svg class="ic"><use href="#i-spark"/></svg>测一测</span><span class="tq">' + gcTestedText(x.id) + ' · ' + x.n + ' 题</span></div>' +
'<div class="nb"><h3>' + esc(x.title) + '</h3><div class="nf">' + (d ? '<span class="gs dn">已测 · ' + esc(d.title) + '</span>' : '<span class="gs">' + TG[x.group] + '</span>') +
'<span class="gt">' + (d ? '再测' : '去测') + ' ›</span></div></div></button>';
}
@@ -802,23 +805,23 @@ button{font:inherit;color:inherit;border:0;background:none;padding:0;cursor:poin
var d = done[x.id];
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>';
'<span class="ft">' + (d ? '<em>我是 · ' + esc(d.title) + '</em>' : gcTestedText(x.id)) + '<span class="ar"><svg class="ic"><use href="#i-right"/></svg></span></span></button>';
}).join('') + '</div>';
if (g === 'game') return '<ol class="csm">' + l.map(function (x, i) {
var d = done[x.id];
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) + '」' : esc(x.sub)) + '</small></span>' +
'<span class="tx"><b>' + esc(x.title) + '</b><small>' + (d ? '已拿称号「' + esc(d.title) + '」' : esc(x.sub)) + '</small>' + '<i class="pc">' + gcTestedText(x.id) + '</i>' + '</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>' +
'<small>' + (d ? '<em>已测 · ' + esc(d.title) + '</em>' : esc(x.sub)) + '</small></span><span class="ar"><svg class="ic"><use href="#i-right"/></svg></span></button>';
'<small>' + (d ? '<em>已测 · ' + esc(d.title) + '</em>' : esc(x.sub)) + '</small>' + '<i class="pc">' + gcTestedText(x.id) + '</i>' + '</span><span class="ar"><svg class="ic"><use href="#i-right"/></svg></span></button>';
}).join('') + '</div>';
return l.map(function (x) {
var d = done[x.id];
return '<button type="button" class="csr" data-test="' + x.id + '"><img src="ceshi/img/' + x.id + '_s.webp" alt="" loading="lazy"><span class="tx"><b>' + esc(x.title) + '</b>' +
'<small>' + (d ? '<em>已测 · ' + esc(d.title) + '</em>' : esc(x.sub)) + '</small></span><span class="ar"><svg class="ic"><use href="#i-right"/></svg></span></button>';
'<small>' + (d ? '<em>已测 · ' + esc(d.title) + '</em>' : esc(x.sub)) + '</small>' + '<i class="pc">' + gcTestedText(x.id) + '</i>' + '</span><span class="ar"><svg class="ic"><use href="#i-right"/></svg></span></button>';
}).join('');
}
function ceshiListHTML() {
@@ -829,14 +832,14 @@ button{font:inherit;color:inherit;border:0;background:none;padding:0;cursor:poin
var f = l.filter(function (x) { return !done[x.id]; })[0] || l[0]; /* 推荐位:本组第一个没测过的 */
if (g === 'psy' || g === 'game') return '<section class="csg g-' + g + '"><div class="csg-h"><b>' + TG[g] + '</b><small>' + l.length + ' 套 · ' + TGD[g] + '</small>' + (nd ? '<em>已测 ' + nd + '</em>' : '') + '</div>' + rest(g, l, done) + '</section>';
return '<section class="csg g-' + g + '"><div class="csg-h"><b>' + TG[g] + '</b><small>' + l.length + ' 套 · ' + TGD[g] + '</small>' + (nd ? '<em>已测 ' + nd + '</em>' : '') + '</div>' +
'<button type="button" class="csf" data-test="' + f.id + '"><span class="tx"><small>' + (done[f.id] ? '再测一次' : '本组推荐') + '</small><b>' + esc(f.title) + '</b><p>' + esc(f.sub) + '</p>' +
'<button type="button" class="csf" data-test="' + f.id + '"><span class="tx"><small>' + (done[f.id] ? '再测一次' : '本组推荐') + '</small><b>' + esc(f.title) + '</b><p>' + esc(f.sub) + '</p><i class="pc">' + gcTestedText(f.id) + '</i>' +
'<span class="go">' + (done[f.id] ? '再测' : '开始测') + '<svg class="ic"><use href="#i-right"/></svg></span></span><img src="ceshi/img/' + f.id + '_s.webp" alt="" loading="lazy"></button>' +
rest(g, l.filter(function (x) { return x !== f; }), done) + '</section>';
}).join('') + '</div>';
}
function ceshiHead() {
var n = function (g) { return TM.filter(function (x) { return x.group === g; }).length; };
return '<div class="csh"><b>孕育测一测</b><p>知识考卷、趣味心理、闯关挑战、好物配置,测完就有专属结果卡</p>' +
return '<div class="csh"><b>孕育测一测</b><p>累计 ' + Math.round(TM.reduce(function (a, x) { return a + gcTested(x.id); }, 0) / 1e4) + ' 万人次参与 · 知识考卷、趣味心理、闯关挑战、好物配置,测完就有专属结果卡</p>' +
'<div class="gn"><span class="g-quiz">考卷 ' + n('quiz') + '</span><span class="g-psy">心理 ' + n('psy') + '</span><span class="g-game">闯关 ' + n('game') + '</span><span class="g-shop">好物 ' + n('shop') + '</span></div>' +
'<img src="ceshi/img/t11_s.webp" alt=""></div>';
}