v26110903 补:12 个独立专题页、测一测页接 host-nav(容器页返回走 navigateBack),广场打开测试开容器页
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -235,6 +235,7 @@ mark{background:linear-gradient(transparent 62%,var(--c20) 0);color:inherit;padd
|
||||
@media (prefers-reduced-motion:reduce){.fade,.stage,.view.on,.mask.on{opacity:1;transform:none;transition:none;animation:none}}
|
||||
</style>
|
||||
<link rel="stylesheet" href="../../topic/_shared/quiz-skin.css?v=26110643"><!-- 11-07 答题页底色 / 卡片 -->
|
||||
<script src="../../js/host-nav.js?v=26110903"></script>
|
||||
</head>
|
||||
<body>
|
||||
<svg class="hide" aria-hidden="true" xmlns="http://www.w3.org/2000/svg">
|
||||
@@ -397,6 +398,7 @@ mark{background:linear-gradient(transparent 62%,var(--c20) 0);color:inherit;padd
|
||||
$('#back').addEventListener('click', function () {
|
||||
if (views.quiz.classList.contains('on') && cur > 0) { goPrev(); return; }
|
||||
if (!views.start.classList.contains('on')) { renderStart(); show('start'); return; }
|
||||
if (window.MBHost && MBHost.back(function () { location.href = plazaURL(); })) return; /* 11-09 容器页:回小程序上一页 */
|
||||
location.href = plazaURL();
|
||||
});
|
||||
sc.addEventListener('scroll', function () { $('#bar').classList.toggle('sh', sc.scrollTop > 4); }, { passive: true });
|
||||
|
||||
@@ -1324,6 +1324,7 @@ html.night .gtg button.on{background:#F2725B;border-color:#F2725B;color:#fff}
|
||||
var TG = { quiz: '常识小测', psy: '趣味心理', game: '趣味闯关', shop: '花钱风格' }, tGrp = '';
|
||||
var CS_MIX = ['t11', 't29', 't01', 't24', 't26', 't16', 't03', 't27', 't14', 't21', 't30', 't18'];
|
||||
function csDone() { try { return (JSON.parse(localStorage.getItem('mmbox.gcts.v1') || '{}')[param('openid') || '_guest']) || {}; } catch (e) { return {}; } }
|
||||
function goCeshi(u) { if (!(window.MBHost && MBHost.open(u))) location.href = u; } /* 11-09 小程序里开容器页,复制链接直达这个测试 */
|
||||
function ceshiURL(id, fromTab) {
|
||||
var q = new URLSearchParams(location.search); ['t', 'n', 'c', 'id', 'mine', 'write', 'fav'].forEach(function (k) { q.delete(k); });
|
||||
if (fromTab) q.set('c', 'ceshi');
|
||||
@@ -1570,7 +1571,7 @@ html.night .gtg button.on{background:#F2725B;border-color:#F2725B;color:#fff}
|
||||
}, 260);
|
||||
}
|
||||
ov.addEventListener('click', function (e) {
|
||||
if (e.target.closest('.lko-go')) { SFX.tap(); location.href = ceshiURL(pk.id, true); return; }
|
||||
if (e.target.closest('.lko-go')) { SFX.tap(); goCeshi(ceshiURL(pk.id, true)); return; }
|
||||
if (e.target.closest('.lko-re')) { if (!ov.classList.contains('done')) return; haptic(); roll(); return; }
|
||||
if (e.target.closest('.lko-x')) { close(); return; }
|
||||
var sb = e.target.closest('.lko-snd');
|
||||
@@ -1954,7 +1955,7 @@ html.night .gtg button.on{background:#F2725B;border-color:#F2725B;color:#fff}
|
||||
$('#more').addEventListener('click', function (e) { if (e.target.closest('[data-t]')) { haptic(); selectTopic(''); } });
|
||||
$('#head').addEventListener('click', function (e) {
|
||||
if (e.target.closest('#qfBanner')) { goQifu(); return; }
|
||||
var cb = e.target.closest('.cbn[data-test], .csv-i[data-test]'); if (cb) { haptic(); location.href = ceshiURL(cb.dataset.test, true); return; }
|
||||
var cb = e.target.closest('.cbn[data-test], .csv-i[data-test]'); if (cb) { haptic(); goCeshi(ceshiURL(cb.dataset.test, true)); return; }
|
||||
var dc = e.target.closest('#csvGo'); if (dc) { csdRoll(dc); return; }
|
||||
var j = e.target.closest('[data-join]'); if (j) { haptic(); openRule(j.dataset.join); return; }
|
||||
if (e.target.closest('[data-rule]')) { openRule(''); return; }
|
||||
@@ -2020,13 +2021,13 @@ html.night .gtg button.on{background:#F2725B;border-color:#F2725B;color:#fff}
|
||||
}
|
||||
$('#more').addEventListener('click', function (e) {
|
||||
var ts = e.target.closest('[data-test]');
|
||||
if (ts) { e.stopPropagation(); haptic(); location.href = ceshiURL(ts.dataset.test, true); }
|
||||
if (ts) { e.stopPropagation(); haptic(); goCeshi(ceshiURL(ts.dataset.test, true)); }
|
||||
}, true);
|
||||
$('#wf').addEventListener('click', function (e) {
|
||||
if (e.target.closest('[data-mine]')) { haptic(); location.href = mineURL(); return; }
|
||||
if (e.target.closest('[data-fav]')) { haptic(); openFav(false); return; }
|
||||
var ts = e.target.closest('[data-test]');
|
||||
if (ts) { haptic(); location.href = ceshiURL(ts.dataset.test, catF === 'ceshi'); return; }
|
||||
if (ts) { haptic(); goCeshi(ceshiURL(ts.dataset.test, catF === 'ceshi')); return; }
|
||||
var lk = e.target.closest('[data-like]');
|
||||
if (lk) { e.stopPropagation(); toggleLike(lk.dataset.like); syncCardLike(lk.dataset.like); return; }
|
||||
var c = e.target.closest('.nc');
|
||||
|
||||
@@ -171,6 +171,7 @@ b{color:var(--h)}
|
||||
.nu:active,.nc li:active{transform:scale(.98)}
|
||||
@media (prefers-reduced-motion:reduce){.fade,.fade .fi{opacity:1;transform:none;transition:none}}
|
||||
</style>
|
||||
<script src="../../js/host-nav.js?v=26110903"></script>
|
||||
</head>
|
||||
<body>
|
||||
<!-- 单色线性图标,stroke 1.8 -->
|
||||
@@ -332,6 +333,7 @@ b{color:var(--h)}
|
||||
|
||||
/* 返回:从首页点进来就 back;直接打开(分享 / 刷新)就回同目录的首页,身份原样带回 */
|
||||
$('#back').addEventListener('click', function () {
|
||||
if (window.MBHost && MBHost.back(function () { location.href = '../../' + location.search + location.hash; })) return; /* 11-09 容器页:回小程序上一页 */
|
||||
if (document.referrer && document.referrer.indexOf(location.host) >= 0 && history.length > 1) history.back();
|
||||
else location.href = '../../' + location.search + location.hash;
|
||||
});
|
||||
|
||||
@@ -178,6 +178,7 @@ mark{background:linear-gradient(transparent 62%,var(--c20) 0);color:inherit;padd
|
||||
@media (prefers-reduced-motion:reduce){.fade,.stage,.view.on,.mask.on{opacity:1;transform:none;transition:none;animation:none}}
|
||||
</style>
|
||||
<link rel="stylesheet" href="../_shared/quiz-skin.css?v=26110643"><!-- 11-07 答题页底色 / 卡片 -->
|
||||
<script src="../../js/host-nav.js?v=26110903"></script>
|
||||
</head>
|
||||
<body>
|
||||
<!-- 单色线性图标(每题一个场景图标 q-*) -->
|
||||
@@ -338,6 +339,7 @@ mark{background:linear-gradient(transparent 62%,var(--c20) 0);color:inherit;padd
|
||||
|
||||
/* 返回:从首页点进来就 back;直接打开(分享 / 刷新)就回同目录的首页,身份 hash 原样带回 */
|
||||
$('#back').addEventListener('click', function () {
|
||||
if (window.MBHost && MBHost.back(function () { location.href = '../../' + location.search + location.hash; })) return; /* 11-09 容器页:回小程序上一页 */
|
||||
if (document.referrer && document.referrer.indexOf(location.host) >= 0 && history.length > 1) history.back();
|
||||
else location.href = '../../' + location.search + location.hash;
|
||||
});
|
||||
|
||||
@@ -179,6 +179,7 @@ mark{background:linear-gradient(transparent 62%,var(--c20) 0);color:inherit;padd
|
||||
@media (prefers-reduced-motion:reduce){.fade,.stage,.view.on,.mask.on{opacity:1;transform:none;transition:none;animation:none}}
|
||||
</style>
|
||||
<link rel="stylesheet" href="../_shared/quiz-skin.css?v=26110643"><!-- 11-07 答题页底色 / 卡片 -->
|
||||
<script src="../../js/host-nav.js?v=26110903"></script>
|
||||
</head>
|
||||
<body>
|
||||
<!-- 单色线性图标(每题一个场景图标 q-*) -->
|
||||
@@ -342,6 +343,7 @@ mark{background:linear-gradient(transparent 62%,var(--c20) 0);color:inherit;padd
|
||||
|
||||
/* 返回:从首页点进来就 back;直接打开(分享 / 刷新)就回同目录的首页,身份 hash 原样带回 */
|
||||
$('#back').addEventListener('click', function () {
|
||||
if (window.MBHost && MBHost.back(function () { location.href = '../../' + location.search + location.hash; })) return; /* 11-09 容器页:回小程序上一页 */
|
||||
if (document.referrer && document.referrer.indexOf(location.host) >= 0 && history.length > 1) history.back();
|
||||
else location.href = '../../' + location.search + location.hash;
|
||||
});
|
||||
|
||||
@@ -278,6 +278,7 @@ h1 .mk{background:linear-gradient(transparent 64%,rgba(24,160,88,.24) 0)}
|
||||
.mask .row button,.mask .row a{height:34px;padding:0 18px;border-radius:99px;border:1px solid rgba(255,255,255,.6);color:#fff;font-size:13.5px;line-height:32px;text-decoration:none}
|
||||
@media (prefers-reduced-motion:reduce){.screen.on,.mask.on{animation:none}.fu{opacity:1;transform:none;transition:none}}
|
||||
</style>
|
||||
<script src="../../js/host-nav.js?v=26110903"></script>
|
||||
</head>
|
||||
<body>
|
||||
<svg class="hide" aria-hidden="true" xmlns="http://www.w3.org/2000/svg">
|
||||
@@ -1415,6 +1416,7 @@ h1 .mk{background:linear-gradient(transparent 64%,rgba(24,160,88,.24) 0)}
|
||||
|
||||
/* 返回:从首页点进来就 back;直接打开(分享 / 刷新)就回同目录的首页,身份原样带回 */
|
||||
$('#back').addEventListener('click', function () {
|
||||
if (window.MBHost && MBHost.back(function () { location.href = '../../' + location.search + location.hash; })) return; /* 11-09 容器页:回小程序上一页 */
|
||||
if (document.referrer && document.referrer.indexOf(location.host) >= 0 && history.length > 1) history.back();
|
||||
else location.href = '../../' + location.search + location.hash;
|
||||
});
|
||||
|
||||
@@ -45,6 +45,7 @@ button{font:inherit;border:0;background:none;color:inherit;cursor:pointer}
|
||||
.mb-brand{text-align:center;color:#C29A8F;font-size:11.5px;line-height:1.7}.mb-brand img{display:block;width:86px;height:auto;margin:0 auto 6px;opacity:.6}.mb-brand p{display:flex;align-items:center;justify-content:center;gap:8px;margin:0;letter-spacing:.06em}.mb-brand p::before,.mb-brand p::after{content:'';width:28px;height:1px;background:#EAD3CC}
|
||||
#scroll .mb-brand{margin:20px 0 0;padding-bottom:calc(120px + env(safe-area-inset-bottom))} /* 给底部 Tab 让位 */
|
||||
</style>
|
||||
<script src="../../js/host-nav.js?v=26110903"></script>
|
||||
</head>
|
||||
<body>
|
||||
<div id="scroll">
|
||||
@@ -133,6 +134,7 @@ button{font:inherit;border:0;background:none;color:inherit;cursor:pointer}
|
||||
});
|
||||
/* 返回:从首页点进来就 back;直接打开(分享 / 刷新)就回首页,身份原样带回 */
|
||||
$('#back').addEventListener('click', function () {
|
||||
if (window.MBHost && MBHost.back(function () { location.href = '../../' + location.search + location.hash; })) return; /* 11-09 容器页:回小程序上一页 */
|
||||
if (document.referrer && document.referrer.indexOf(location.host) >= 0 && history.length > 1) history.back();
|
||||
else location.href = '../../' + location.search + location.hash;
|
||||
});
|
||||
|
||||
@@ -184,6 +184,7 @@ h2{font-size:18px;font-weight:700;line-height:1.4;color:var(--ink)}
|
||||
@media (prefers-reduced-motion:reduce){.fade{opacity:1;transform:none;transition:none}}
|
||||
@media (max-width:370px){h1{font-size:26px}.pt b{font-size:13.5px}.bm{padding:9px 8px 11px}.bm .v{font-size:18px}}
|
||||
</style>
|
||||
<script src="../../js/host-nav.js?v=26110903"></script>
|
||||
</head>
|
||||
<body>
|
||||
<!-- 单色线性图标:stroke 1.8,颜色走 .ic(主色) -->
|
||||
@@ -417,6 +418,7 @@ h2{font-size:18px;font-weight:700;line-height:1.4;color:var(--ink)}
|
||||
|
||||
/* 返回:从首页点进来就 back;直接打开(分享 / 刷新)就回同目录的首页,身份原样带回 */
|
||||
$('#back').addEventListener('click', function () {
|
||||
if (window.MBHost && MBHost.back(function () { location.href = '../../' + location.search + location.hash; })) return; /* 11-09 容器页:回小程序上一页 */
|
||||
if (document.referrer && document.referrer.indexOf(location.host) >= 0 && history.length > 1) history.back();
|
||||
else location.href = '../../' + location.search + location.hash;
|
||||
});
|
||||
|
||||
@@ -197,6 +197,7 @@ mark{background:linear-gradient(transparent 62%,var(--c20) 0);color:inherit;padd
|
||||
.care p+p{margin-top:8px}
|
||||
</style>
|
||||
<link rel="stylesheet" href="../_shared/quiz-skin.css?v=26110643"><!-- 11-07 答题页底色 / 卡片 -->
|
||||
<script src="../../js/host-nav.js?v=26110903"></script>
|
||||
</head>
|
||||
<body>
|
||||
<!-- 单色线性图标(每题一个场景图标 q-*) -->
|
||||
@@ -373,6 +374,7 @@ mark{background:linear-gradient(transparent 62%,var(--c20) 0);color:inherit;padd
|
||||
|
||||
/* 返回:从首页点进来就 back;直接打开(分享 / 刷新)就回同目录的首页,身份 hash 原样带回 */
|
||||
$('#back').addEventListener('click', function () {
|
||||
if (window.MBHost && MBHost.back(function () { location.href = '../../' + location.search + location.hash; })) return; /* 11-09 容器页:回小程序上一页 */
|
||||
if (document.referrer && document.referrer.indexOf(location.host) >= 0 && history.length > 1) history.back();
|
||||
else location.href = '../../' + location.search + location.hash;
|
||||
});
|
||||
|
||||
@@ -178,6 +178,7 @@ h1 em{font-style:normal;background:linear-gradient(transparent 62%,rgba(240,138,
|
||||
.fade.in{opacity:1;transform:none}
|
||||
@media (prefers-reduced-motion:reduce){.fade{opacity:1;transform:none;transition:none}.amt .tr i{transform:none;transition:none}}
|
||||
</style>
|
||||
<script src="../../js/host-nav.js?v=26110903"></script>
|
||||
</head>
|
||||
<body>
|
||||
<svg width="0" height="0" style="position:absolute" aria-hidden="true">
|
||||
@@ -313,6 +314,7 @@ h1 em{font-style:normal;background:linear-gradient(transparent 62%,rgba(240,138,
|
||||
|
||||
/* 返回:从首页点进来就 back;直接打开(分享 / 刷新)就回同目录的首页,身份原样带回 */
|
||||
$('#back').addEventListener('click', function () {
|
||||
if (window.MBHost && MBHost.back(function () { location.href = '../../' + location.search + location.hash; })) return; /* 11-09 容器页:回小程序上一页 */
|
||||
if (document.referrer && document.referrer.indexOf(location.host) >= 0 && history.length > 1) history.back();
|
||||
else location.href = '../../' + location.search + location.hash;
|
||||
});
|
||||
|
||||
@@ -196,6 +196,7 @@ mark{background:linear-gradient(transparent 62%,var(--c20) 0);color:inherit;padd
|
||||
.warn{margin-top:20px;padding:10px 14px;border-radius:14px;background:var(--cbg);color:#4F7F2A;font-size:13px;line-height:1.6;text-align:center}
|
||||
</style>
|
||||
<link rel="stylesheet" href="../_shared/quiz-skin.css?v=26110643"><!-- 11-07 答题页底色 / 卡片 -->
|
||||
<script src="../../js/host-nav.js?v=26110903"></script>
|
||||
</head>
|
||||
<body>
|
||||
<!-- 单色线性图标(每题一个场景图标 q-*) -->
|
||||
@@ -359,6 +360,7 @@ mark{background:linear-gradient(transparent 62%,var(--c20) 0);color:inherit;padd
|
||||
|
||||
/* 返回:从首页点进来就 back;直接打开(分享 / 刷新)就回同目录的首页,身份 hash 原样带回 */
|
||||
$('#back').addEventListener('click', function () {
|
||||
if (window.MBHost && MBHost.back(function () { location.href = '../../' + location.search + location.hash; })) return; /* 11-09 容器页:回小程序上一页 */
|
||||
if (document.referrer && document.referrer.indexOf(location.host) >= 0 && history.length > 1) history.back();
|
||||
else location.href = '../../' + location.search + location.hash;
|
||||
});
|
||||
|
||||
@@ -72,6 +72,7 @@ button{cursor:pointer}
|
||||
.foot{margin:14px 20px 0;font-size:12px;color:var(--m);text-align:center;line-height:1.6}
|
||||
</style>
|
||||
<link rel="stylesheet" href="../_shared/wizard.css?v=26110464">
|
||||
<script src="../../js/host-nav.js?v=26110903"></script>
|
||||
</head>
|
||||
<body>
|
||||
<svg style="position:absolute;width:0;height:0" aria-hidden="true"><symbol id="i-back" viewBox="0 0 24 24"><path d="M15 5l-7 7 7 7"/></symbol></svg>
|
||||
@@ -113,6 +114,7 @@ button{cursor:pointer}
|
||||
var $ = function (s) { return document.querySelector(s); };
|
||||
var sc = $('#scroll'), KEY = 'mmbox.edd.calc', DAY = 864e5;
|
||||
$('#back').addEventListener('click', function () {
|
||||
if (window.MBHost && MBHost.back(function () { location.href = '../../' + location.search + location.hash; })) return; /* 11-09 容器页:回小程序上一页 */
|
||||
if (document.referrer && document.referrer.indexOf(location.host) >= 0 && history.length > 1) history.back();
|
||||
else location.href = '../../' + location.search + location.hash;
|
||||
});
|
||||
|
||||
@@ -205,6 +205,7 @@ html.cm:not(.cm-all) .cm-more{display:flex;align-items:center;justify-content:ce
|
||||
<!-- 11-04 计算器模式(calc=1)走分步:一步一题、最后出结果,见 ../_shared/wizard.js -->
|
||||
<link rel="stylesheet" href="../_shared/wizard.css?v=26110464">
|
||||
<script src="../_shared/wizard.js?v=26110464"></script>
|
||||
<script src="../../js/host-nav.js?v=26110903"></script>
|
||||
</head>
|
||||
<body>
|
||||
<svg class="hide" aria-hidden="true" xmlns="http://www.w3.org/2000/svg">
|
||||
@@ -410,6 +411,7 @@ html.cm:not(.cm-all) .cm-more{display:flex;align-items:center;justify-content:ce
|
||||
|
||||
/* 返回:从首页点进来就 back;直接打开(分享 / 刷新)就回同目录的首页,身份原样带回 */
|
||||
$('#back').addEventListener('click', function () {
|
||||
if (window.MBHost && MBHost.back(function () { location.href = '../../' + location.search + location.hash; })) return; /* 11-09 容器页:回小程序上一页 */
|
||||
if (document.referrer && document.referrer.indexOf(location.host) >= 0 && history.length > 1) history.back();
|
||||
else location.href = '../../' + location.search + location.hash;
|
||||
});
|
||||
|
||||
@@ -197,6 +197,7 @@ mark{background:linear-gradient(transparent 62%,var(--c20) 0);color:inherit;padd
|
||||
@media (prefers-reduced-motion:reduce){.fade,.stage,.view.on,.mask.on{opacity:1;transform:none;transition:none;animation:none}}
|
||||
</style>
|
||||
<link rel="stylesheet" href="../_shared/quiz-skin.css?v=26110643"><!-- 11-07 答题页底色 / 卡片 -->
|
||||
<script src="../../js/host-nav.js?v=26110903"></script>
|
||||
</head>
|
||||
<body>
|
||||
<!-- 单色线性图标(每题一个场景图标 q-*) -->
|
||||
@@ -358,6 +359,7 @@ mark{background:linear-gradient(transparent 62%,var(--c20) 0);color:inherit;padd
|
||||
|
||||
/* 返回:从首页点进来就 back;直接打开(分享 / 刷新)就回同目录的首页,身份 hash 原样带回 */
|
||||
$('#back').addEventListener('click', function () {
|
||||
if (window.MBHost && MBHost.back(function () { location.href = '../../' + location.search + location.hash; })) return; /* 11-09 容器页:回小程序上一页 */
|
||||
if (document.referrer && document.referrer.indexOf(location.host) >= 0 && history.length > 1) history.back();
|
||||
else location.href = '../../' + location.search + location.hash;
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user