From dc156b7a6ae45bf63037b1e766da7ba5312aff4b Mon Sep 17 00:00:00 2001 From: Karlcarlo Date: Thu, 8 Oct 2026 07:51:02 +0000 Subject: [PATCH] =?UTF-8?q?=E9=A2=84=E8=A7=88=E7=89=88=E9=BB=98=E8=AE=A4?= =?UTF-8?q?=E5=AF=B9=E6=8E=A5=E7=9C=9F=E5=AE=9E=E6=8E=A5=E5=8F=A3=EF=BC=9A?= =?UTF-8?q?=E5=B7=A5=E5=85=B7=E5=8D=A1=E3=80=81=E8=84=9A=E5=8D=B0=E3=80=81?= =?UTF-8?q?=E6=A1=A3=E6=A1=88=E5=85=A5=E5=8F=A3=E4=B8=8D=E5=86=8D=E5=9B=BA?= =?UTF-8?q?=E5=AE=9A=E7=94=A8=E7=A4=BA=E4=BE=8B=EF=BC=8C=E4=BB=85=20demo?= =?UTF-8?q?=3D1=20/=20fpdemo=3D1=20=E6=97=B6=E6=98=BE=E7=A4=BA=E7=A4=BA?= =?UTF-8?q?=E4=BE=8B=20(v26100465)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Opus 5.5 --- index.html | 2 +- js/app.js | 11 +++++++---- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/index.html b/index.html index 30abe31..b77ce20 100644 --- a/index.html +++ b/index.html @@ -7,7 +7,7 @@ 兜爸心选 · 孕育陪伴 - + diff --git a/js/app.js b/js/app.js index b7ab3ed..9992596 100644 --- a/js/app.js +++ b/js/app.js @@ -3,7 +3,7 @@ (function () { 'use strict'; /* 页面版本号(YYMMDD+序号):显示在「关于兜爸心选」页底部;bump 时同步 head 注释与 ?v= */ - var VER = '26100464'; + var VER = '26100465'; const $ = (s, c) => (c || document).querySelector(s); const $$ = (s, c) => Array.from((c || document).querySelectorAll(s)); @@ -291,7 +291,8 @@ q.push('return_url=' + encodeURIComponent(location.href)); /* demo=1:**预览路径一律带**(2026-10-05 用户:「档案页里的示例数据没有了」—— 预览是给人看效果的,要看到档案自己的示例,含 40 周旅程图); 正式首页 /mama-box/ 永远不带 —— 档案页带了会忽略用户自己的数据(成长档案会话 19875b1b 明确要求正式入口不带)。 */ - if (location.pathname.indexOf('/mama-box-preview/') === 0) q.push('demo=1'); + /* 2026-10-08 用户:「把正式版对接后端接口都同步到预览版」→ 预览默认也看真实档案,只有显式 demo=1 才带。 */ + if (DEMO) q.push('demo=1'); if (q.length) u += '?' + q.join('&'); reportLastApp(ARCHIVE_H5, 'chengzhangdangan'); reportHostLocation(u); @@ -4755,7 +4756,8 @@ 2026-09-22 出过写死演示值被所有用户看到的事故(AGENTS §4.2 不造假数据), 所以示例数据绝不能靠「接口没回来就兜底」这种条件触发,只认预览路径。 结构照搬 tool-cards 接口,直接喂给 applyRemoteCards,渲染逻辑一行不多写。 */ - const DEMO_CARDS = location.pathname.indexOf('/mama-box-preview/') === 0 ? { + /* 2026-10-08 用户:「把正式版对接后端接口都同步到预览版」→ 预览默认也调真实 tool-cards,只有显式 demo=1(DEMO 已限定预览路径)才用示例。 */ + const DEMO_CARDS = DEMO ? { ok: true, day: '2026-09-30', cards: [ { slot: 'kick', value: '12', sub: '3 段 · 最近 14:20' }, @@ -4890,7 +4892,8 @@ /* ⚠️ 示例脚印(2026-10-03 用户:「多放两个脚印示例,数胎动、数宫缩、称体重」)——**只在预览环境** (路径含 mama-box-preview,或 hash 带 fpdemo=1)追加,用来看多条时的排版;正式版不会出现,不冒充真记录。 确认样式后整段删掉即可。 */ - if (!DEMO && (/mama-box-preview/.test(location.pathname) || hashParam('fpdemo') === '1')) { + /* 2026-10-08 起预览默认只显示真实脚印;要看多条排版,预览地址加 fpdemo=1。 */ + if (!DEMO && /mama-box-preview/.test(location.pathname) && hashParam('fpdemo') === '1') { rows.push( { at: '09:20', label: '数胎动,宝宝动了 12 次', detail: '', app: '' }, { at: '11:05', label: '数宫缩 3 次,间隔约 8 分钟', detail: '', app: '' },