预览站不跟 UGC 开关、一直显示广场/测一测(?ugc=0 看关闭效果),正式站照开关(v26110417)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
deploy
2026-11-04 08:25:32 +00:00
parent 8b8c62d63f
commit e1ffb4b9f4
25 changed files with 73 additions and 66 deletions

View File

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

View File

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

View File

@@ -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=26110415';
var l = document.createElement('link'); l.rel = 'stylesheet'; l.href = 'js/gch/v4.css?v=26110417';
document.head.appendChild(l);
var s = document.createElement('script'); s.src = 'js/gch/v4.js?v=26110415';
var s = document.createElement('script'); s.src = 'js/gch/v4.js?v=26110417';
s.onload = function () { if (sec.querySelector('.g4-foot')) merge(); else sec.addEventListener('gc4-ready', merge, { once: true }); }; /* v4 要先拉 feed.js 才渲染 */
document.body.appendChild(s);

View File

@@ -9,7 +9,7 @@
if (/[?&]kit=0(?:&|$)/.test(location.search)) return;
var box = document.getElementById('kit'), sec = document.getElementById('kitHome');
if (!box || !sec) return;
var V = '26110415';
var V = '26110417';
var l = document.createElement('link'); l.rel = 'stylesheet'; l.href = 'js/kit.css?v=' + V; document.head.appendChild(l);
document.documentElement.classList.add('has-kit');

View File

@@ -8,7 +8,7 @@
postMessage 不是实时投递,微信在分享那一刻才派发,所以每次换内容都要再报一次;子页面没引 jweixin,这里按需加载。 */
(function (g) {
'use strict';
var V = '26110415';
var V = '26110417';
var isWx = /MicroMessenger/i.test(navigator.userAgent || '');
var waiting = [], loading = false;
function ready(cb) {

View File

@@ -23,6 +23,13 @@
apply(on);
if (guard && !on) de.style.visibility = 'hidden'; /* 还不知道开没开:先别露内容,免得关着时闪一下 */
/* 11-04 用户:「回到改预览页面」→ 预览站(/mama-box-preview/)不跟后台开关,一直显示,方便看广场改动;?ugc=0 看关闭效果。正式站照开关走。 */
if (/\/mama-box-preview\//.test(location.pathname)) {
var pv = !/[?&]ugc=0/.test(location.search);
apply(pv); if (guard) { if (!pv) goHome(); else de.style.visibility = ''; }
window.__mbUgcReady = Promise.resolve(pv);
return;
}
window.__mbUgcReady = new Promise(function (res) {
var t = setTimeout(function () { res(null); }, 4000);
fetch('/api/mp/public/mama-box/config', { cache: 'no-store' })