档案tab一期跳 yunqi-dangan H5(带openid/unionid转发), 内置档案屏屏蔽保留 (v26090718)

This commit is contained in:
2026-09-08 01:26:04 +08:00
parent 1e6eef781a
commit c59c7a71c7
2 changed files with 23 additions and 5 deletions

View File

@@ -154,7 +154,25 @@
catch (e) { el.scrollTop = 0; }
}
/* 「档案」tab 一期跳独立 H5(yunqi-dangan)。
⚠️ 内置档案屏(#screen-archive)暂时屏蔽:数据来源未确认,不放进一期给用户。
屏的代码/样式全部保留,后续确认数据源后把这里改回 go('archive') 原逻辑即可。
身份转发:把当前 openid/unionid 带过去(query + hash 双写,对齐身份注入惯例)。 */
function goArchiveH5() {
const oid = hashParam('openid');
const uid = hashParam('unionid');
let u = 'https://mp.yizhezhe.com/yunqi-dangan/';
const q = [];
if (oid) q.push('openid=' + encodeURIComponent(oid));
if (uid) q.push('unionid=' + encodeURIComponent(uid));
if (q.length) u += '?' + q.join('&');
if (oid) u += '#openid=' + encodeURIComponent(oid);
location.href = u;
}
function go(name) {
/* 「档案」先跳孕期档案 H5(一期屏蔽内置档案屏,原因见 goArchiveH5 注释) */
if (name === 'archive') { goArchiveH5(); return; }
if (state.screen === name) {
scrollTop($(`#screen-${name}`)); // 再次点击当前 tab 回到顶部
return;