孕期首页版本号统一 (v26102202):关于页顶部/页脚、我的页底一律显示 VER,后台文案里写死的 v3.2.1 也替换成 VER
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -7,7 +7,7 @@
|
|||||||
<meta name="mobile-web-app-capable" content="yes">
|
<meta name="mobile-web-app-capable" content="yes">
|
||||||
<meta name="apple-mobile-web-app-capable" content="yes">
|
<meta name="apple-mobile-web-app-capable" content="yes">
|
||||||
<title>兜爸心选 · 孕育陪伴</title>
|
<title>兜爸心选 · 孕育陪伴</title>
|
||||||
<!-- V:26102201 缓存版本标记:改 css/js 时同步 bump 该值(与 js/app.js 的 VER 同源),静态资源按 mtime 走 ETag 自动刷新 -->
|
<!-- V:26102202 缓存版本标记:改 css/js 时同步 bump 该值(与 js/app.js 的 VER 同源),静态资源按 mtime 走 ETag 自动刷新 -->
|
||||||
<link rel="stylesheet" href="mama-box.css">
|
<link rel="stylesheet" href="mama-box.css">
|
||||||
<link rel="stylesheet" href="night.css">
|
<link rel="stylesheet" href="night.css">
|
||||||
<!-- 夜晚模式:首屏绘制前就按上次的选择加 class,避免先白后黑闪一下(开关在首页右上角 #nightBtn,逻辑见 app.js) -->
|
<!-- 夜晚模式:首屏绘制前就按上次的选择加 class,避免先白后黑闪一下(开关在首页右上角 #nightBtn,逻辑见 app.js) -->
|
||||||
@@ -1202,7 +1202,7 @@
|
|||||||
<!-- 退出授权登录:仅已授权时显示(applyRemoteProfile 控制 style.display)。
|
<!-- 退出授权登录:仅已授权时显示(applyRemoteProfile 控制 style.display)。
|
||||||
调 box_app /auth/logout —— 只翻授权状态,不清昵称/头像/手机号等资料 -->
|
调 box_app /auth/logout —— 只翻授权状态,不清昵称/头像/手机号等资料 -->
|
||||||
<button class="me-logout ripple" id="meLogoutCard" style="display:none">退出登录</button>
|
<button class="me-logout ripple" id="meLogoutCard" style="display:none">退出登录</button>
|
||||||
<p class="me-ver">兜爸心选 · v3.2.1</p>
|
<p class="me-ver">兜爸心选</p>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
</main>
|
</main>
|
||||||
@@ -2050,7 +2050,7 @@
|
|||||||
<!-- 2026-10-05 首页头图:宝宝时不时动一动小手小脚(独立文件,删掉这一行即下线) -->
|
<!-- 2026-10-05 首页头图:宝宝时不时动一动小手小脚(独立文件,删掉这一行即下线) -->
|
||||||
<script src="js/baby-limbs.js?v=26101201"></script>
|
<script src="js/baby-limbs.js?v=26101201"></script>
|
||||||
<script src="js/coach.js?v=26101211"></script>
|
<script src="js/coach.js?v=26101211"></script>
|
||||||
<script src="js/birth-flow.js?v=26102201"></script>
|
<script src="js/birth-flow.js?v=26102202"></script>
|
||||||
|
|
||||||
<!-- 禁止下拉回弹(2026-10-11 统一规则,与孕期体重同一段):竖向拖动时从手指下往上找还能朝该方向滚的容器,找不到才拦;横滑、双指、可滚列表不受影响 -->
|
<!-- 禁止下拉回弹(2026-10-11 统一规则,与孕期体重同一段):竖向拖动时从手指下往上找还能朝该方向滚的容器,找不到才拦;横滑、双指、可滚列表不受影响 -->
|
||||||
<script>
|
<script>
|
||||||
|
|||||||
24
js/app.js
24
js/app.js
@@ -3,7 +3,7 @@
|
|||||||
(function () {
|
(function () {
|
||||||
'use strict';
|
'use strict';
|
||||||
/* 页面版本号(YYMMDD+序号):显示在「关于兜爸心选」页底部;bump 时同步 head 注释与 ?v= */
|
/* 页面版本号(YYMMDD+序号):显示在「关于兜爸心选」页底部;bump 时同步 head 注释与 ?v= */
|
||||||
var VER = '26102201';
|
var VER = '26102202';
|
||||||
const $ = (s, c) => (c || document).querySelector(s);
|
const $ = (s, c) => (c || document).querySelector(s);
|
||||||
const $$ = (s, c) => Array.from((c || document).querySelectorAll(s));
|
const $$ = (s, c) => Array.from((c || document).querySelectorAll(s));
|
||||||
|
|
||||||
@@ -2085,7 +2085,7 @@
|
|||||||
},
|
},
|
||||||
|
|
||||||
about: {
|
about: {
|
||||||
title: '关于兜爸心选', more: '当前版本 v3.2.1',
|
title: '关于兜爸心选', more: '当前版本 v' + VER, /* 2026-10-22(测试会话 150e0991):v3.2.1 是写死的,与页脚 VER 对不上 → 全部改读 VER */
|
||||||
hero: 1,
|
hero: 1,
|
||||||
lead: '兜爸心选想做的事很简单:让你不用记录,也能留下记录。',
|
lead: '兜爸心选想做的事很简单:让你不用记录,也能留下记录。',
|
||||||
groups: [
|
groups: [
|
||||||
@@ -2094,10 +2094,13 @@
|
|||||||
['txt', '等宝宝出生、等他长大、等你某天忽然想起这段日子,这本档案都还在原地等你。']
|
['txt', '等宝宝出生、等他长大、等你某天忽然想起这段日子,这本档案都还在原地等你。']
|
||||||
] }
|
] }
|
||||||
],
|
],
|
||||||
foot: '兜爸心选 v3.2.1 · 已陪伴 268 万位妈妈'
|
foot: '兜爸心选 v' + VER + ' · 已陪伴 268 万位妈妈'
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/* 「我的」页底的版本号同样读 VER(index.html 里写死的只是占位) */
|
||||||
|
{ const mv = document.querySelector('.me-ver'); if (mv) mv.textContent = '兜爸心选 · v' + VER; }
|
||||||
|
|
||||||
const ABOUT_HERO =
|
const ABOUT_HERO =
|
||||||
'<div class="st-about">' +
|
'<div class="st-about">' +
|
||||||
'<div class="st-logo">' +
|
'<div class="st-logo">' +
|
||||||
@@ -2109,7 +2112,7 @@
|
|||||||
'</svg>' +
|
'</svg>' +
|
||||||
'</div>' +
|
'</div>' +
|
||||||
'<div class="st-appname">兜爸心选</div>' +
|
'<div class="st-appname">兜爸心选</div>' +
|
||||||
'<div class="st-ver">v3.2.1 · 陪你从两条杠到见面</div>' +
|
'<div class="st-ver">v' + VER + ' · 陪你从两条杠到见面</div>' +
|
||||||
'</div>';
|
'</div>';
|
||||||
|
|
||||||
function renderSetting(key) {
|
function renderSetting(key) {
|
||||||
@@ -2144,12 +2147,7 @@
|
|||||||
}).join('');
|
}).join('');
|
||||||
|
|
||||||
$('#stBody').innerHTML = html;
|
$('#stBody').innerHTML = html;
|
||||||
/* 「关于兜爸心选」页底部显示版本号(全站不再有固定底标) */
|
/* 「关于兜爸心选」的版本号已经在顶部 / 页脚(都读 VER),原来底部单独追加的 #aboutVer 去掉,免得同一页出现三遍 */
|
||||||
if (key === 'about') {
|
|
||||||
let av = document.getElementById('aboutVer');
|
|
||||||
if (!av) { av = document.createElement('p'); av.id = 'aboutVer'; av.className = 'about-ver'; $('#detailSetting .detail-body').appendChild(av); }
|
|
||||||
av.textContent = 'v' + VER;
|
|
||||||
}
|
|
||||||
scrollTop($('#detailSetting .detail-body'));
|
scrollTop($('#detailSetting .detail-body'));
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -5144,8 +5142,10 @@
|
|||||||
function __applyAbout(ct) {
|
function __applyAbout(ct) {
|
||||||
if (!ct) return;
|
if (!ct) return;
|
||||||
SETTINGS.about.title = ct.title || SETTINGS.about.title;
|
SETTINGS.about.title = ct.title || SETTINGS.about.title;
|
||||||
SETTINGS.about.more = ct.more || SETTINGS.about.more;
|
/* 2026-10-22:后台文案里写死的版本号(如 v3.2.1)一律换成当前 VER,关于页 / 页脚 / 我的页底只认这一个版本号 */
|
||||||
SETTINGS.about.foot = ct.foot || SETTINGS.about.foot;
|
const _v = t => String(t).replace(/v\d+(?:\.\d+)+/gi, 'v' + VER);
|
||||||
|
SETTINGS.about.more = ct.more ? _v(ct.more) : SETTINGS.about.more;
|
||||||
|
SETTINGS.about.foot = ct.foot ? _v(ct.foot) : SETTINGS.about.foot;
|
||||||
}
|
}
|
||||||
function applyRemoteAll() {
|
function applyRemoteAll() {
|
||||||
var openid = hashParam('openid');
|
var openid = hashParam('openid');
|
||||||
|
|||||||
Reference in New Issue
Block a user