档案tab一期跳 yunqi-dangan H5(带openid/unionid转发), 内置档案屏屏蔽保留 (v26090718)
This commit is contained in:
10
index.html
10
index.html
@@ -6,8 +6,8 @@
|
|||||||
<meta name="theme-color" content="#F4593C">
|
<meta name="theme-color" content="#F4593C">
|
||||||
<meta name="apple-mobile-web-app-capable" content="yes">
|
<meta name="apple-mobile-web-app-capable" content="yes">
|
||||||
<title>妈妈盒子 · 孕育陪伴</title>
|
<title>妈妈盒子 · 孕育陪伴</title>
|
||||||
<!-- V:26090717 缓存版本标记:改 css/js 时同步 bump 该值,并给下方资源引用加 ?v= 以强制 webview 刷新子资源 -->
|
<!-- V:26090718 缓存版本标记:改 css/js 时同步 bump 该值,并给下方资源引用加 ?v= 以强制 webview 刷新子资源 -->
|
||||||
<link rel="stylesheet" href="mama-box.css?v=26090717">
|
<link rel="stylesheet" href="mama-box.css?v=26090718">
|
||||||
<script src="https://res.wx.qq.com/open/js/jweixin-1.6.0.js"></script>
|
<script src="https://res.wx.qq.com/open/js/jweixin-1.6.0.js"></script>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
@@ -1761,8 +1761,8 @@
|
|||||||
加载失败/离线时 window.wx 为 undefined,goMall() 会降级为 toast 提示,
|
加载失败/离线时 window.wx 为 undefined,goMall() 会降级为 toast 提示,
|
||||||
不影响应用其余功能。 -->
|
不影响应用其余功能。 -->
|
||||||
|
|
||||||
<script src="js/app.js?v=26090717"></script>
|
<script src="js/app.js?v=26090718"></script>
|
||||||
<!-- 页面版本号(排查 webview 缓存):底部会显示 v26090717 -->
|
<!-- 页面版本号(排查 webview 缓存):底部会显示 v26090718 -->
|
||||||
<div id="ver" style="position:fixed;left:0;right:0;bottom:10px;text-align:center;z-index:9999;pointer-events:none;color:#B3A69C;font-size:10px;letter-spacing:.5px">v26090717</div>
|
<div id="ver" style="position:fixed;left:0;right:0;bottom:10px;text-align:center;z-index:9999;pointer-events:none;color:#B3A69C;font-size:10px;letter-spacing:.5px">v26090718</div>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
18
js/app.js
18
js/app.js
@@ -154,7 +154,25 @@
|
|||||||
catch (e) { el.scrollTop = 0; }
|
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) {
|
function go(name) {
|
||||||
|
/* 「档案」先跳孕期档案 H5(一期屏蔽内置档案屏,原因见 goArchiveH5 注释) */
|
||||||
|
if (name === 'archive') { goArchiveH5(); return; }
|
||||||
if (state.screen === name) {
|
if (state.screen === name) {
|
||||||
scrollTop($(`#screen-${name}`)); // 再次点击当前 tab 回到顶部
|
scrollTop($(`#screen-${name}`)); // 再次点击当前 tab 回到顶部
|
||||||
return;
|
return;
|
||||||
|
|||||||
Reference in New Issue
Block a user