mama-box: 我的页 — 去掉右上角商城图标; 退出登录改资料卡右上角图标按钮; 商城卡去掉甄选好物角标 (v26090706)

This commit is contained in:
2026-09-07 23:31:22 +08:00
parent ecfa4d054b
commit 3b52b1c222
3 changed files with 31 additions and 24 deletions

View File

@@ -6,8 +6,8 @@
<meta name="theme-color" content="#F4593C">
<meta name="apple-mobile-web-app-capable" content="yes">
<title>妈妈盒子 · 孕育陪伴</title>
<!-- V:26090705 缓存版本标记:改 css/js 时同步 bump 该值,并给下方资源引用加 ?v= 以强制 webview 刷新子资源 -->
<link rel="stylesheet" href="mama-box.css?v=26090705">
<!-- V:26090706 缓存版本标记:改 css/js 时同步 bump 该值,并给下方资源引用加 ?v= 以强制 webview 刷新子资源 -->
<link rel="stylesheet" href="mama-box.css?v=26090706">
<script src="https://res.wx.qq.com/open/js/jweixin-1.6.0.js"></script>
</head>
<body>
@@ -711,13 +711,14 @@
<section class="screen" id="screen-me" data-screen="me">
<div class="me-top">
<div class="hero-top">
<!-- 进商城:在 web-view 内 wx.miniProgram.switchTab 跳商城原生页(见 goMall) -->
<!-- (商城图标已移除:进商城统一走下方「兜爸心选商城」模块 meMallCard)
<button class="icon-btn plain" id="btnMall" aria-label="进商城">
<svg viewBox="0 0 24 24" width="22" height="22" aria-hidden="true">
<path d="M5 8h14l-1.2 11a2 2 0 0 1-2 1.8H8.2a2 2 0 0 1-2-1.8z" fill="none" stroke="currentColor" stroke-width="1.7" stroke-linejoin="round"/>
<path d="M8.6 10V6.8a3.4 3.4 0 0 1 6.8 0V10" fill="none" stroke="currentColor" stroke-width="1.7" stroke-linecap="round"/>
</svg>
</button>
-->
<!-- 扁平化齿轮:描边式矢量,替换原本的 ⚙️ emoji -->
<button class="icon-btn plain" data-modal="modalProfile" aria-label="设置">
<svg viewBox="0 0 24 24" width="22" height="22" aria-hidden="true">
@@ -760,7 +761,13 @@
谁要是把那行加回来,会把连续记录天数冲掉,而且是静默的。 -->
<p>已连续记录 <b>42</b> 天</p>
</div>
<!-- 右侧留一个尖括号,提示整张卡是可以点进去改资料的 -->
<!-- 右侧:退出登录图标按钮(清除本机身份 → 重新授权测试)+ 尖括号提示卡可点 -->
<button class="icon-btn plain me-exit" id="meLogoutBtn" aria-label="退出登录">
<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>
</button>
<i class="me-chev" aria-hidden="true">›</i>
</div>
</div>
@@ -776,15 +783,7 @@
</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>
<!-- 退出登录已移到个人资料卡右上角的图标按钮(#meLogoutBtn) -->
<!-- ⚠️ 这两处的 data-modal 从 modalPreg 改成了 modalProfile:
「编辑孕期信息」那张弹窗已整个并进「我的资料」(见文件末尾那段说明)。
小名 / 性别 / 预产期现在只有一处能改,改完照样 syncPregnancy() 回刷这张卡。 -->
@@ -983,7 +982,7 @@
<h2 class="sec-title dark">兜爸心选商城</h2>
<button class="wx-card ripple" id="meMallCard">
<span class="wx-top"><span class="wx-badge">甄选好物</span></span>
<!-- 「甄选好物」角标已按需求去掉(.wx-top 角标行整行移除;孕育顾问那条"限量福利"不受影响) -->
<span class="wx-body">
<!-- 逛商城入口:购物袋图标(同 .wx-fig 76×拉伸高) -->
<span class="wx-fig" aria-hidden="true">
@@ -1758,8 +1757,8 @@
加载失败/离线时 window.wx 为 undefined,goMall() 会降级为 toast 提示,
不影响应用其余功能。 -->
<script src="js/app.js?v=26090705"></script>
<!-- 页面版本号(排查 webview 缓存):底部会显示 v26090705 -->
<div id="ver" style="position:fixed;left:0;right:0;bottom:10px;text-align:center;z-index:9999;pointer-events:none;color:#B3A69C;font-size:10px;letter-spacing:.5px">v26090705</div>
<script src="js/app.js?v=26090706"></script>
<!-- 页面版本号(排查 webview 缓存):底部会显示 v26090706 -->
<div id="ver" style="position:fixed;left:0;right:0;bottom:10px;text-align:center;z-index:9999;pointer-events:none;color:#B3A69C;font-size:10px;letter-spacing:.5px">v26090706</div>
</body>
</html>

View File

@@ -4156,13 +4156,17 @@
var meAuth = $('#meAuthCard');
if (meAuth) meAuth.addEventListener('click', goAuth);
/* 「退出登录」:清除本机身份(openid/unionid/资料展示) → 重新加载页面回到未登录态。
入口跳到授权页,便于直接测试授权流程。 */
var meLogout = $('#meLogoutCard');
if (meLogout) meLogout.addEventListener('click', function () {
/* 「退出登录」(个人资料卡右上角图标按钮):清除本机身份(openid/unionid/资料展示)
→ 重新加载页面回到未登录态,便于直接测试授权流程。
⚠️ stopPropagation:me-card 整卡是 data-modal="modalProfile",不阻止冒泡
会顺带打开资料弹窗。 */
var meLogout = $('#meLogoutBtn');
if (meLogout) meLogout.addEventListener('click', function (e) {
e.preventDefault();
e.stopPropagation();
haptic();
if (!(window.wx && window.wx.miniProgram)) { toast('请在微信小程序中打开'); return; }
try { if (location.hash) location.hash = ''; } catch (e) {}
try { if (location.hash) location.hash = ''; } catch (e2) {}
// 清除本地读取到的 openid/unionid,回到未登录态
try {
var base = location.href.split('#')[0];
@@ -4172,7 +4176,7 @@
var url = base + (q && q !== '?' ? q : '') ;
// 重新加载当前 H5(去掉身份)→ applyRemoteProfile 因无 openid 跳过,页面回到未登录占位
location.replace(url + '?t=' + Date.now());
} catch (e) {
} catch (e3) {
toast('已清除身份');
}
});

View File

@@ -1556,7 +1556,11 @@ a.skip:focus{left:16px;top:16px}
position:relative;z-index:2;overflow:hidden;cursor:pointer;transition:transform .18s var(--ease)}
.me-card:active{transform:scale(.985)}
/* 尖括号跟全站 .chev 一个灰度,别再用白色 */
.me-chev{margin-left:auto;flex:0 0 auto;font-style:normal;font-size:24px;line-height:1;color:#C9BFB8}
.me-chev{flex:0 0 auto;font-style:normal;font-size:24px;line-height:1;color:#C9BFB8;margin-left:6px}
/* 退出登录图标按钮(住 me-card 右上角,尖括号左边)。
⚠️ 退出按钮接管了 margin-left:auto 把自己推到最右,chev 改普通间距跟在后面。 */
.me-exit{margin-left:auto;color:#C9BFB8;flex:0 0 auto}
.me-exit:active{color:#C33A2E}
/* 头像底从「白蒙版 + 白描边」换成暖橘底 + 品牌色剪影(与 .pc-ico 同一套配色)。
⚠️ 外圈本批从 #FFF3EC 改回了纯 #fff。那圈浅橘白光晕本来是照着
「卡是白的」调的 —— 卡一变暖(终点 #FFE9DB),#FFF3EC 就夹在