首页广场 V6:测一测只留两个,挪到「其他妈妈也在搜」下面

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
deploy
2026-11-02 04:22:25 +00:00
parent a9fb9c6421
commit 60ee41bb9d
6 changed files with 7 additions and 13 deletions

View File

@@ -57,18 +57,10 @@
'<small>' + q.who + '</small><b>' + esc(q.t) + '</b><em>开始测 ›</em></a>';
}).join('') + '</div><p class="g6-vf">两个都测完,看看你们是哪种组合 · 已有 23.9万 人测过</p></div>';
}
/* 11-02 用户:「上面两个,下面再摆 3 个小列表,相当于 5 个测一测」→ 三个都显示,不分版 */
var QL = [
{ href: 'topic/yali/', t: '你最近的孕期压力有多大?', m: '12 题 · 6.1万 人测过', img: 'topic/yali/img/hero.webp' },
{ href: 'topic/yinshi/', t: '你的孕期饮食能打几分?', m: '12 题 · 5.4万 人测过', img: 'topic/yinshi/img/hero.webp' },
{ href: 'topic/zhunbei/', t: '迎接宝宝,你准备好几成了?', m: '12 题 · 4.7万 人测过', img: 'topic/zhunbei/img/hero.webp' }
];
qz.insertAdjacentHTML('beforeend', '<div class="g6-ql">' + QL.map(function (q) {
return '<a class="g6-li ripple" href="' + lk(q) + '"><img src="' + esc(q.img) + '" alt="" loading="lazy" onerror="this.style.visibility=\'hidden\'">' +
'<span class="g6-lb"><b>' + esc(q.t) + '</b><small>' + q.m + '</small></span><em>去测</em></a>';
}).join('') + '</div>');
sec.insertBefore(qz, foot);
/* 11-02 用户:「太多了,只放两个测一测」→ 3 个小列表撤掉(topic/yali、yinshi、zhunbei 页面保留,先不挂入口);
位置从卡堆下面挪到「其他妈妈也在搜」下面 */
sec.insertBefore(box, foot);
sec.insertBefore(qz, foot);
var list = box.querySelector('.g6-list'), all = box.querySelector('.g6-all');
var tot = (window.__mbPulse && window.__mbPulse.total && +window.__mbPulse.total.value) || 1510000;
fetch('assets/data/qa/hot.json?' + Date.now()).then(function (r) { return r.ok ? r.json() : []; }).catch(function () { return []; }).then(function (bank) {