真机验收修复:我的页去框沉浸式 + 三页字体加粗 + 卡片细节

我的页(h5/mine)整页去框满屏 + 顶部状态栏沉浸式(云朵铺到状态栏下/隐藏假状态栏/内容 safe-area/头像对齐原型);三页统一注入 faux-bold(安卓 WebView 中文回退字体不合成粗体兜底);上报最低价选记录态列表间距去框对齐(top 198→154);上报记录卡平台改主名+主logo(美团/京东/淘宝)+ 菜品名 2 行截断

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
陈世睿
2026-06-30 09:52:07 +08:00
parent cdfe66dcee
commit 4d730169bf
6 changed files with 84 additions and 8 deletions
+30 -2
View File
@@ -5,8 +5,8 @@
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>比价APP 高保真原型 (外卖版)</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no, viewport-fit=cover">
<title>我的 · 傻瓜比价</title>
<style>
* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { background: #000; }
@@ -3445,6 +3445,14 @@ TODO: 补充 @owner / @from / @to / @notes(参照 FLOW.md
.prof-unlogged-hero .prof-avatar { margin: 0 auto 12px; background: linear-gradient(180deg,#F0F0F0 0%,#DDDDDD 100%); }
.prof-unlogged-cta { margin-top: 6px; background: linear-gradient(180deg,#FFD600 0%,#FFB300 100%); border: none; padding: 8px 24px; border-radius: 999px; font-size: 14px; font-weight: 700; color: #1a1a1a; cursor: pointer; box-shadow: 0 4px 12px rgba(255,180,52,.35); }
</style>
<style>
/* 【WebView 去框 + 沉浸式顶】原样是 375×812 手机框预览(黑底居中);覆盖为满屏 + 状态栏沉浸(云朵铺到真状态栏下) */
html, body { height: 100%; background: #fff; }
body { display: block; }
.device { width: 100%; height: 100%; min-height: 100vh; border-radius: 0; box-shadow: none; }
.prof-statusbar { display: none !important; }
.prof-hero { padding-top: calc(env(safe-area-inset-top, 0px) + 64px); }
</style>
<div class="screen active" id="profile">
<div class="prof-statusbar">
<div class="prof-status-time">9:41</div>
@@ -7767,5 +7775,25 @@ document.addEventListener('DOMContentLoaded', () => {
else updateWelfareCheckinTabDot();
})();
</script>
<script>
/* 安卓 WebView 对中文回退字体常不合成粗体 → 给 font-weight≥600 的文字加水平描影 faux-bold(不引字体,三页统一) */
(function(){
function fb(el){
if(el.nodeType!==1||el.dataset.fb)return;
var w=parseInt(getComputedStyle(el).fontWeight,10)||400;
if(w<600)return;
var has=false,ch=el.childNodes;
for(var i=0;i<ch.length;i++){if(ch[i].nodeType===3&&ch[i].nodeValue.trim()){has=true;break;}}
if(!has)return;
var c=getComputedStyle(el).color,s=(w>=800?'0.4px':'0.3px'),sh=s+' 0 0 '+c+', -'+s+' 0 0 '+c;
el.style.textShadow=el.style.textShadow?el.style.textShadow+', '+sh:sh;
el.dataset.fb='1';
}
function scan(r){var a=r.querySelectorAll('*');for(var i=0;i<a.length;i++)fb(a[i]);}
function run(){scan(document);}
if(document.readyState==='loading')document.addEventListener('DOMContentLoaded',run);else run();
try{new MutationObserver(function(ms){for(var j=0;j<ms.length;j++){var an=ms[j].addedNodes;for(var k=0;k<an.length;k++){if(an[k].nodeType===1){fb(an[k]);scan(an[k]);}}}}).observe(document.documentElement,{childList:true,subtree:true});}catch(e){}
})();
</script>
</body>
</html>
+21 -1
View File
@@ -318,7 +318,7 @@ body.transitioning-tab { /* no animation */ }
.select-task-panel .fb-task-card { margin: 0; }
.device.selecting .select-task-panel { display: block; }
/* 【去框】单选态滚动区 bottom 76→0action bar 改为 fixed 浮在视口底) */
.device.selecting .hist-scroll { top: 198px; bottom: 0; padding-bottom: 92px; }
.device.selecting .hist-scroll { top: 154px; bottom: 0; padding-bottom: 92px; }
/* 单选模式顶部 3 步指引 */
.device.selecting .tab-bar { display: none; }
@@ -1783,5 +1783,25 @@ async function submitFeedback() {
else updateWelfareCheckinTabDot();
})();
</script>
<script>
/* 安卓 WebView 对中文回退字体常不合成粗体 → 给 font-weight≥600 的文字加水平描影 faux-bold(不引字体,三页统一) */
(function(){
function fb(el){
if(el.nodeType!==1||el.dataset.fb)return;
var w=parseInt(getComputedStyle(el).fontWeight,10)||400;
if(w<600)return;
var has=false,ch=el.childNodes;
for(var i=0;i<ch.length;i++){if(ch[i].nodeType===3&&ch[i].nodeValue.trim()){has=true;break;}}
if(!has)return;
var c=getComputedStyle(el).color,s=(w>=800?'0.4px':'0.3px'),sh=s+' 0 0 '+c+', -'+s+' 0 0 '+c;
el.style.textShadow=el.style.textShadow?el.style.textShadow+', '+sh:sh;
el.dataset.fb='1';
}
function scan(r){var a=r.querySelectorAll('*');for(var i=0;i<a.length;i++)fb(a[i]);}
function run(){scan(document);}
if(document.readyState==='loading')document.addEventListener('DOMContentLoaded',run);else run();
try{new MutationObserver(function(ms){for(var j=0;j<ms.length;j++){var an=ms[j].addedNodes;for(var k=0;k<an.length;k++){if(an[k].nodeType===1){fb(an[k]);scan(an[k]);}}}}).observe(document.documentElement,{childList:true,subtree:true});}catch(e){}
})();
</script>
</body>
</html>
+33 -5
View File
@@ -169,7 +169,9 @@ body {
margin-top: 4px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
}
.badge {
@@ -347,9 +349,9 @@ body {
// 原封不动拷进本页 logos/(保留原型文件名 -waimai/-shanguang,与原型逐字一致)。
// 原最低价 / 上报价的平台是动态的(original_platform_id / reported_platform_id),先归一化再取图。
var PLATFORM_LOGOS = {
'meituan-waimai': 'logos/meituan-waimai.png',
'taobao-shanguang': 'logos/taobao-shanguang.png',
'jd-waimai': 'logos/jd-waimai.png',
'meituan-waimai': 'logos/meituan.png',
'taobao-shanguang': 'logos/taobao.png',
'jd-waimai': 'logos/jd.png',
};
// ===== 平台别名归一化(复用「比价记录页」PLATFORM_ALIASES 思路)=====
@@ -370,6 +372,12 @@ function platformLogo(idOrName) {
var id = resolvePlatformId(idOrName);
return id ? PLATFORM_LOGOS[id] : '';
}
// 平台父名(展示:子平台→父名,美团外卖→美团 / 淘宝闪购→淘宝 / 京东外卖→京东,对齐 history 卡片)
var PLATFORM_NAMES = { 'meituan-waimai': '美团', 'taobao-shanguang': '淘宝', 'jd-waimai': '京东' };
function platformDisplayName(idOrName, fallback) {
var id = resolvePlatformId(idOrName);
return (id && PLATFORM_NAMES[id]) || fallback || '';
}
// ===== 状态映射:后端 status → badge class + 文案 + 图标 =====
// 图标 svg 照搬原型三个 badge 内对应的 svg(审核中=时钟 / 已通过=对勾 / 未通过=叉)。
@@ -473,7 +481,7 @@ function renderCompareRow(kind, platformId, platformName, cents) {
'<span class="rec-compare-label">' + label + '</span>' +
'<span class="rec-compare-pl">' +
(logo ? '<img src="' + logo + '" alt="">' : '') +
'<span>' + esc(platformName || '') + '</span>' +
'<span>' + esc(platformDisplayName(platformId || platformName, platformName)) + '</span>' +
'</span>' +
'<span class="rec-compare-price"><span class="cur">¥</span>' + fenToYuan(cents) + '</span>' +
'</div>';
@@ -597,5 +605,25 @@ window.goBackToProfile = goBackToProfile;
})();
</script>
<script>
/* 安卓 WebView 对中文回退字体常不合成粗体 → 给 font-weight≥600 的文字加水平描影 faux-bold(不引字体,三页统一) */
(function(){
function fb(el){
if(el.nodeType!==1||el.dataset.fb)return;
var w=parseInt(getComputedStyle(el).fontWeight,10)||400;
if(w<600)return;
var has=false,ch=el.childNodes;
for(var i=0;i<ch.length;i++){if(ch[i].nodeType===3&&ch[i].nodeValue.trim()){has=true;break;}}
if(!has)return;
var c=getComputedStyle(el).color,s=(w>=800?'0.4px':'0.3px'),sh=s+' 0 0 '+c+', -'+s+' 0 0 '+c;
el.style.textShadow=el.style.textShadow?el.style.textShadow+', '+sh:sh;
el.dataset.fb='1';
}
function scan(r){var a=r.querySelectorAll('*');for(var i=0;i<a.length;i++)fb(a[i]);}
function run(){scan(document);}
if(document.readyState==='loading')document.addEventListener('DOMContentLoaded',run);else run();
try{new MutationObserver(function(ms){for(var j=0;j<ms.length;j++){var an=ms[j].addedNodes;for(var k=0;k<an.length;k++){if(an[k].nodeType===1){fb(an[k]);scan(an[k]);}}}}).observe(document.documentElement,{childList:true,subtree:true});}catch(e){}
})();
</script>
</body>
</html>
Binary file not shown.

After

Width:  |  Height:  |  Size: 218 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 200 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 232 KiB