diff --git a/index.html b/index.html
index cfe42a4..89af6d3 100644
--- a/index.html
+++ b/index.html
@@ -7,7 +7,7 @@
兜爸心选 · 孕育陪伴
-
+
diff --git a/js/app.js b/js/app.js
index 9075f1b..c727724 100644
--- a/js/app.js
+++ b/js/app.js
@@ -3,7 +3,7 @@
(function () {
'use strict';
/* 页面版本号(YYMMDD+序号):显示在「关于兜爸心选」页底部;bump 时同步 head 注释与 ?v= */
- var VER = '26101022';
+ var VER = '26101023';
const $ = (s, c) => (c || document).querySelector(s);
const $$ = (s, c) => Array.from((c || document).querySelectorAll(s));
@@ -378,12 +378,20 @@
}
/* 记一下宫格上的小标签「孕16周开放」(图标右上角):没到门槛的灰一点,到了自动去掉;首页工具卡改成直接换替补(swapHomeCards) */
function markStageLocks() {
- $$('#appsGrid .app').forEach(b => {
+ const tiles = $$('#appsGrid .app');
+ tiles.forEach(b => {
const g = stageGateOf(decodeURIComponent(b.dataset.url || ''), decodeURIComponent(b.dataset.id || ''));
const on = stageLocked(g);
b.classList.toggle('is-locked', on);
if (on) b.dataset.lock = '孕' + g.wk + '周开放'; else delete b.dataset.lock;
});
+ /* 2026-10-11 用户:没开放的排到后面,不放最前面。能用的保持后台排序(data-ord),没开放的整体挪到末尾;
+ 孕周到了解锁,就按 data-ord 回到原位。只挪 DOM 顺序,点击走事件委托不受影响。 */
+ const grid = $('#appsGrid');
+ if (grid && tiles.length) {
+ tiles.slice().sort((a, b) => (a.classList.contains('is-locked') - b.classList.contains('is-locked')) || (+a.dataset.ord - +b.dataset.ord))
+ .forEach(t => grid.appendChild(t));
+ }
swapHomeCards();
}
/* 首页工具卡按孕周自动换(2026-10-11 用户:「孕育工具卡片替换成其他几个能让用户用的,否则首页体验特别差,
@@ -455,14 +463,14 @@
function renderAppGrid(apps) {
const grid = $('#appsGrid');
if (!grid) return;
- grid.innerHTML = apps.map(a => {
+ grid.innerHTML = apps.map((a, i) => {
const ico = a.logo || a.icon || '';
const name = a.name || a.identifier || '应用';
/* 有 logo:白底圆角让图盖满;无 logo:colorTheme/调色板 + 首字彩色块。
⚠️ colorTheme 目前全是 'blue' 颜色名 —— 有图时别拿它当底色,否则清一色蓝。 */
const bg = ico ? 'background:#fff' : 'background:' + (a.colorTheme || appTileColor(name));
const img = ico ? '
' : '' + name.slice(0, 1) + '';
- return '';
+ return '';
}).join('');
/* 磁贴点击(事件委托,innerHTML 重建后不用重绑) */
grid.onclick = function (e) {