From 7cd9d4258378a6988ef922d038601ee6af807817 Mon Sep 17 00:00:00 2001 From: Karlcarlo Date: Tue, 8 Sep 2026 00:53:58 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E7=94=A8=E6=88=B7=E6=B8=85=20state=20?= =?UTF-8?q?=E5=86=85=E7=BD=AE=E6=BC=94=E7=A4=BA=E9=BB=98=E8=AE=A4=E5=80=BC?= =?UTF-8?q?(DEFAULT=5FDUE/=E5=AD=9527),=20=E8=B5=84=E6=96=99=E5=BC=B9?= =?UTF-8?q?=E7=AA=97=E9=A2=84=E4=BA=A7=E6=9C=9F/=E5=AD=95=E5=91=A8?= =?UTF-8?q?=E5=85=A8=E7=A9=BA+=E9=94=81=E5=AE=9A=20(v26090716)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- index.html | 10 +++++----- js/app.js | 7 ++++++- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/index.html b/index.html index 3c42249..3e8207c 100644 --- a/index.html +++ b/index.html @@ -6,8 +6,8 @@ 妈妈盒子 · 孕育陪伴 - - + + @@ -1761,8 +1761,8 @@ 加载失败/离线时 window.wx 为 undefined,goMall() 会降级为 toast 提示, 不影响应用其余功能。 --> - - -
v26090715
+ + +
v26090716
diff --git a/js/app.js b/js/app.js index 679b84b..6613da0 100644 --- a/js/app.js +++ b/js/app.js @@ -4120,9 +4120,14 @@ } if (pg && pg.code === 200 && pg.result) { /* 新用户空态(未完善资料):后端不再给默认孕周 → 显示引导占位, - 不读任何演示数据(详见 syncPregnancy 的 pregEmpty 分支) */ + 不读任何演示数据(详见 syncPregnancy 的 pregEmpty 分支)。 + ⚠️ 同时清掉 state 的内置演示默认值(DEFAULT_DUE=今天+3个月/孕27周), + 否则「我的资料」弹窗回填时又会把它们带回来。 */ if (pg.result.empty || pg.result.week == null) { state.pregEmpty = true; + state.due = null; + state.week = null; + state.day = null; } else { state.pregEmpty = false; state.week = pg.result.week;