mama-box: 我的页加「退出登录」按钮 + 授权卡改 navigateTo 授权页(替代非实时 postMessage)

This commit is contained in:
2026-09-07 21:09:57 +08:00
parent 44f21eff91
commit 24d5e07cd0
3 changed files with 44 additions and 6 deletions

View File

@@ -765,7 +765,7 @@
</div>
<div class="page-body no-top">
<!-- 授权完善资料:H5 → postMessage → 宿主小程序弹原生授权面板(手机号/昵称/头像) → box_app /profile/auth 落库 -->
<!-- 授权完善资料:H5 → navigateTo → 小程序授权页(头像/昵称/手机号) → box_app /auth/profile 落库 -->
<div class="list-card" style="margin-top:12px" id="meAuthBox">
<button class="li ripple" id="meAuthCard">
<span class="li-ico o"><svg viewBox="0 0 24 24" width="19" height="19" aria-hidden="true"><rect x="5" y="10.5" width="14" height="9.5" rx="2.5" fill="none" stroke="currentColor" stroke-width="1.8"/><path d="M8.5 10.5V8a3.5 3.5 0 0 1 7 0v2.5" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round"/><path d="M12 15v2" stroke="currentColor" stroke-width="1.8" stroke-linecap="round"/></svg></span>
@@ -774,6 +774,16 @@
<i class="chev">›</i>
</button>
</div>
<!-- 退出登录:清除本机身份 → 跳授权页,便于直接测试授权流程 -->
<div class="list-card" id="meLogoutBox" style="margin-top:12px">
<button class="li ripple" id="meLogoutCard">
<span class="li-ico r"><svg viewBox="0 0 24 24" width="19" height="19" aria-hidden="true"><path d="M14 5h5a1.5 1.5 0 0 1 1.5 1.5v11A1.5 1.5 0 0 1 19 19h-5" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round"/><path d="M10 12H3m0 0 3.5-3.5M3 12l3.5 3.5" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"/></svg></span>
<span class="li-t">退出登录</span>
<span class="li-v">清除本机身份后重新授权</span>
<i class="chev">›</i>
</button>
</div>
<!-- ⚠️ 这两处的 data-modal 从 modalPreg 改成了 modalProfile:
「编辑孕期信息」那张弹窗已整个并进「我的资料」(见文件末尾那段说明)。
小名 / 性别 / 预产期现在只有一处能改,改完照样 syncPregnancy() 回刷这张卡。 -->