From c59c7a71c7774e86503b938e1f713d7de3e572d9 Mon Sep 17 00:00:00 2001 From: Karlcarlo Date: Tue, 8 Sep 2026 01:26:04 +0800 Subject: [PATCH] =?UTF-8?q?=E6=A1=A3=E6=A1=88tab=E4=B8=80=E6=9C=9F?= =?UTF-8?q?=E8=B7=B3=20yunqi-dangan=20H5(=E5=B8=A6openid/unionid=E8=BD=AC?= =?UTF-8?q?=E5=8F=91),=20=E5=86=85=E7=BD=AE=E6=A1=A3=E6=A1=88=E5=B1=8F?= =?UTF-8?q?=E5=B1=8F=E8=94=BD=E4=BF=9D=E7=95=99=20(v26090718)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- index.html | 10 +++++----- js/app.js | 18 ++++++++++++++++++ 2 files changed, 23 insertions(+), 5 deletions(-) diff --git a/index.html b/index.html index b610bc2..debf1f5 100644 --- a/index.html +++ b/index.html @@ -6,8 +6,8 @@ 妈妈盒子 · 孕育陪伴 - - + + @@ -1761,8 +1761,8 @@ 加载失败/离线时 window.wx 为 undefined,goMall() 会降级为 toast 提示, 不影响应用其余功能。 --> - - -
v26090717
+ + +
v26090718
diff --git a/js/app.js b/js/app.js index aa556eb..7b9d1f6 100644 --- a/js/app.js +++ b/js/app.js @@ -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;