diff --git a/h5/css/style.css b/h5/css/style.css index 0c63572..744de39 100644 --- a/h5/css/style.css +++ b/h5/css/style.css @@ -652,3 +652,9 @@ button { font-family: inherit; border: 0; background: none; cursor: pointer; } /* #13 分类卡图片对齐设计稿(约 100px 见方、圆角 10) */ .ditem-img { width: 100px; height: 100px; border-radius: 10px; } + +/* ═══════════ 第7轮:用户测试 agent 反馈 ═══════════ */ +/* P1-1 隐私页标题被悬浮返回键遮挡:正文上留返回键位 */ +#p-policy .policy-body { padding-top: 52px; } +/* P1-2 姿态提示气泡压住底部引导文字:改到步骤文案下方、取景框上方 */ +.cam-hint { bottom: auto; top: 26%; } diff --git a/h5/js/app.js b/h5/js/app.js index 0935c62..8669715 100644 --- a/h5/js/app.js +++ b/h5/js/app.js @@ -731,8 +731,8 @@ { key: 'mole', color: '#282828' }, // 痣 { key: 'acne', color: '#D30C0C' } // 痤疮 ] }, - tone: { img: '#viz-tone', map: 'brown_area' }, // 肤色:色沉图 - sens: { img: '#viz-sens', map: 'red_area' }, // 敏感:红区图 + tone: { img: '#viz-tone', blendMap: 'brown_area' }, // 肤色:正脸×色沉图正片叠底(直挂是悬浮面具感,合成后色沉落在脸上) + sens: { img: '#viz-sens', blendMap: 'red_area' }, // 敏感:正脸×红区图正片叠底(直挂白底过淡不可读) acne: { img: '#viz-acne', photo: true, marks: [ // 痘痘:正脸+闭口粉刺/痤疮标记 { key: 'closed_comedones', color: '#E8A13D' }, // 闭口粉刺 { key: 'acne', color: '#D30C0C' }, // 痤疮 @@ -818,7 +818,11 @@ var ctx = cv.getContext('2d'); ctx.drawImage(photo, 0, 0, w, h); if (opts && opts.dim) { ctx.fillStyle = 'rgba(0,0,0,' + opts.dim + ')'; ctx.fillRect(0, 0, w, h); } // 压暗底色让增强线可读 - if (overlay) ctx.drawImage(overlay, 0, 0, w, h); + if (overlay) { + if (opts && opts.blend) ctx.globalCompositeOperation = opts.blend; // 正片叠底:白底图层(红区/色沉)叠到脸上 + ctx.drawImage(overlay, 0, 0, w, h); + ctx.globalCompositeOperation = 'source-over'; + } var scaled = vizScaleMarks(marks, w / photo.naturalWidth); var lw = Math.max(3, Math.round(w / 200)); // 线宽随图走,卡片缩略后仍可见 var minBox = Math.round(w / 36); // 过小标记放大到最小框,保证缩略可见 @@ -861,11 +865,18 @@ var cfg = VIZ_CAT[key]; var imgEl = $(cfg.img); if (!imgEl) continue; - if (cfg.map) { // 整幅图层(色沉图/红区图):图层缺失 → 保留占位 + if (cfg.map) { // 整幅图层:图层缺失 → 保留占位 var u = vizMapURL(maps[cfg.map]); if (u) { imgEl.src = u; imgEl.hidden = false; } continue; } + if (cfg.blendMap) { // 图层×正脸正片叠底(色沉/红区):无照片时直挂图层;图层缺失 → 保留占位 + var bu = vizMapURL(maps[cfg.blendMap]); + if (!bu) continue; + if (!frontPhoto) { imgEl.src = bu; imgEl.hidden = false; continue; } + vizCompose(frontPhoto, bu, [], imgEl, { blend: 'multiply' }); + continue; + } if (cfg.overlay) { // 透明增强图层(皱纹):有照片则合成(可按 cfg.dim 压暗),无照片单挂图层;图层缺失 → 保留占位 var ov = vizMapURL(maps[cfg.overlay]); if (!ov) continue; @@ -921,10 +932,12 @@ // 检测可视化:轮廓=正脸实拍,其余按 VIZ_CAT 取 face_maps 图层或叠加 marks(payload 缺失时各卡保留占位) renderViz(payload, frontPhoto); - // 降级标注(下颌线未参与评分等,非空才展示) + // 降级标注:只展示用户可感知/可执行的(下颌线、侧脸、补拍类); + // 引擎内部技术项(上限锁未执行/字段未返回等)不面向用户展示 var notesEl = $('#vm-notes'); - if (vm.notes && vm.notes.length) { - notesEl.innerHTML = vm.notes.map(function (t) { return '*' + esc(t); }).join('
'); + var userNotes = (vm.notes || []).filter(function (t) { return /下颌线|侧脸|补拍|重拍/.test(t); }); + if (userNotes.length) { + notesEl.innerHTML = userNotes.map(function (t) { return '*' + esc(t); }).join('
'); notesEl.style.display = ''; } else { notesEl.style.display = 'none'; diff --git a/h5/preview/e2e-20260926/r7-policy.png b/h5/preview/e2e-20260926/r7-policy.png new file mode 100644 index 0000000..972d92e Binary files /dev/null and b/h5/preview/e2e-20260926/r7-policy.png differ diff --git a/h5/preview/e2e-20260926/r7-tab1.png b/h5/preview/e2e-20260926/r7-tab1.png new file mode 100644 index 0000000..b705950 Binary files /dev/null and b/h5/preview/e2e-20260926/r7-tab1.png differ