五个页面按 h5/css 的 style.css → ui-20261009 → ui-20261012 覆盖顺序逐条重排, 换算规则固定为 calc(N * var(--u)) → 2N rpx,固定 px 的字号保持 px。 - app.acss:换回 H5 设计 token(方角小倒角按钮 10rpx、卡片 14rpx、.chev 折线箭头) - splash/profile/history:底图与按钮文字图改用 H5 资源,隐私/政策弹窗按 H5 重排 - report:环形分用 conic-gradient、人脸裁切窗口叠加 face_maps、标记点百分比盒、 侧脸皱纹 pending/unavailable 文案;用 Playwright 抓 H5 94 个选择器几何比对, 整页高 2438.7 vs 2438.67 - camera:淘宝 <camera> 组件在真机整页崩溃(嵌了微信专有的 <cover-view>), 改为默认系统相机 + `config.nativeCamera` 开关 + pages/camtest 冒烟页验证组件 - permissions:淘宝用带前缀的 scope.camera(裸名返回 5022 Scope:camera信息不存在), 先试带前缀再退回裸名,拒绝后不再重复弹窗 - voice:非 HTTPS 资源导致的异常不再冒泡成整页崩溃;app.js 加开发版错误 toast - 开发版入口:权限诊断(启动页/相机页)、相机组件测试 - 测试 20/20(新增权限与相机能力用例)
260 lines
5.8 KiB
Plaintext
260 lines
5.8 KiB
Plaintext
/* ═════ 05-07 拍照页 ═════
|
||
对齐 H5 h5/css/style.css 的 #s-cam 静态态:
|
||
.cam-step top 7.1%,21.5px/500,letter-spacing 1u,text-shadow
|
||
.cam-guide bottom 22.4%,14.5px,分隔线 15u 高
|
||
.cam-controls bottom 5.2%,高 62u,内边距 56u,快门 62u
|
||
单位换算:calc(N * var(--u)) → 2N rpx */
|
||
.cam {
|
||
position: absolute;
|
||
left: 0; top: 0; right: 0; bottom: 0;
|
||
overflow: hidden;
|
||
background: #000;
|
||
}
|
||
/* H5 静态态:白底 + 85% 黑蒙版 ≈ #262626 */
|
||
.cam-bg {
|
||
position: absolute;
|
||
left: 0; top: 0; right: 0; bottom: 0;
|
||
background: #262626;
|
||
}
|
||
|
||
/* ─── 顶部步骤文案 ─── */
|
||
.cam-step {
|
||
position: absolute;
|
||
left: 0; right: 0;
|
||
top: 7.1%;
|
||
text-align: center;
|
||
color: #fff;
|
||
font-size: 21.5px;
|
||
font-weight: 500;
|
||
line-height: 1.5;
|
||
letter-spacing: 2rpx;
|
||
text-shadow: 0 1px 10px rgba(0, 0, 0, .4);
|
||
z-index: 2;
|
||
}
|
||
.cam-step-tip { font-size: 21.5px; }
|
||
.cam-step-no { font-size: 21.5px; }
|
||
|
||
/* ─── 真机取景相机(铺满,不能有子节点) ─── */
|
||
.cam-device {
|
||
position: absolute;
|
||
left: 0; top: 0;
|
||
width: 100%;
|
||
height: 100%;
|
||
z-index: 0;
|
||
}
|
||
|
||
/* ─── 取景蒙版:H5 用 SVG 镂空出人脸轮廓;这里用「椭圆开窗 + 巨大 box-shadow」实现同样的暗框 + 中间透亮 ─── */
|
||
.cam-mask {
|
||
position: absolute;
|
||
left: 0; top: 0; right: 0; bottom: 0;
|
||
z-index: 1;
|
||
pointer-events: none;
|
||
}
|
||
.cam-hole {
|
||
position: absolute;
|
||
left: 50%;
|
||
top: 50%;
|
||
width: 440rpx;
|
||
height: 580rpx;
|
||
margin-left: -220rpx;
|
||
margin-top: -290rpx;
|
||
border-radius: 50%;
|
||
box-shadow: 0 0 0 3000rpx rgba(0, 0, 0, .82);
|
||
}
|
||
.mask-1 { transform: translateX(-26rpx) rotate(-4deg); }
|
||
.mask-2 { transform: translateX(26rpx) rotate(4deg); }
|
||
|
||
/* ─── 底部引导条 ─── */
|
||
.cam-guide {
|
||
position: absolute;
|
||
left: 0; right: 0;
|
||
bottom: 22.4%;
|
||
display: flex;
|
||
justify-content: center;
|
||
align-items: center;
|
||
z-index: 2;
|
||
}
|
||
.cam-guide-item {
|
||
color: #fff;
|
||
font-size: 14.5px;
|
||
font-weight: 400;
|
||
}
|
||
.cam-guide-sep {
|
||
width: 0;
|
||
height: 30rpx;
|
||
border-left: 1px solid rgba(255, 255, 255, .7);
|
||
margin: 0 52rpx;
|
||
}
|
||
|
||
/* ─── 控制条:相册 / 快门 / 翻转 ─── */
|
||
.cam-controls {
|
||
position: absolute;
|
||
left: 0; right: 0;
|
||
bottom: 5.2%;
|
||
height: 124rpx;
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: space-between;
|
||
padding: 0 112rpx;
|
||
box-sizing: border-box;
|
||
margin-bottom: env(safe-area-inset-bottom);
|
||
z-index: 2;
|
||
}
|
||
.cam-side {
|
||
width: 120rpx;
|
||
height: 124rpx;
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: center;
|
||
color: #fff;
|
||
font-size: 14.5px;
|
||
}
|
||
.cam-shutter {
|
||
width: 124rpx;
|
||
height: 124rpx;
|
||
border-radius: 50%;
|
||
border: 4rpx solid #fff;
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: center;
|
||
box-sizing: border-box;
|
||
}
|
||
.cam-shutter-dot {
|
||
width: 96rpx;
|
||
height: 96rpx;
|
||
border-radius: 50%;
|
||
background: #fff;
|
||
}
|
||
|
||
/* ─── 提示/错误 ─── */
|
||
.cam-hint {
|
||
position: absolute;
|
||
left: 64rpx;
|
||
right: 64rpx;
|
||
bottom: 34%;
|
||
text-align: center;
|
||
color: rgba(255, 255, 255, .9);
|
||
font-size: 13px;
|
||
line-height: 1.6;
|
||
z-index: 3;
|
||
}
|
||
|
||
/* ─── 拍后预览 ─── */
|
||
.cam-preview {
|
||
position: absolute;
|
||
left: 0; top: 0; right: 0; bottom: 0;
|
||
background: #000;
|
||
display: flex;
|
||
flex-direction: column;
|
||
align-items: center;
|
||
justify-content: center;
|
||
z-index: 10;
|
||
}
|
||
.cam-preview-img {
|
||
width: 100%;
|
||
height: 68%;
|
||
}
|
||
.cam-preview-btns {
|
||
display: flex;
|
||
gap: 40rpx;
|
||
margin-top: 40rpx;
|
||
}
|
||
.cam-preview-btn {
|
||
width: 220rpx;
|
||
height: 72rpx;
|
||
line-height: 72rpx;
|
||
text-align: center;
|
||
border-radius: 10rpx;
|
||
border: 1px solid rgba(255, 255, 255, .6);
|
||
color: #fff;
|
||
font-size: 14.5px;
|
||
}
|
||
.cam-preview-btn.ok {
|
||
background: #F5F078;
|
||
border-color: #F5F078;
|
||
color: #282828;
|
||
}
|
||
|
||
/* ─── 分析中 ─── */
|
||
.cam-analyzing {
|
||
position: absolute;
|
||
left: 0; top: 0; right: 0; bottom: 0;
|
||
background: rgba(0, 0, 0, .78);
|
||
display: flex;
|
||
flex-direction: column;
|
||
align-items: center;
|
||
justify-content: center;
|
||
z-index: 20;
|
||
}
|
||
.cam-analyzing-text {
|
||
color: #fff;
|
||
font-size: 15px;
|
||
letter-spacing: 1rpx;
|
||
}
|
||
.cam-cancel {
|
||
margin-top: 32rpx;
|
||
color: rgba(255, 255, 255, .7);
|
||
font-size: 13px;
|
||
text-decoration: underline;
|
||
}
|
||
|
||
/* ─── 权限诊断(开发版) ─── */
|
||
.cam-diag-entry {
|
||
position: absolute;
|
||
top: 88rpx;
|
||
right: 32rpx;
|
||
z-index: 30;
|
||
padding: 12rpx 20rpx;
|
||
border-radius: 12rpx;
|
||
background: rgba(0, 0, 0, .55);
|
||
color: #fff;
|
||
font-size: 12px;
|
||
}
|
||
.cam-diag {
|
||
position: absolute;
|
||
left: 32rpx; right: 32rpx;
|
||
top: 160rpx; bottom: 160rpx;
|
||
z-index: 40;
|
||
background: rgba(6, 16, 26, .96);
|
||
border: 1rpx solid rgba(120, 200, 255, .35);
|
||
border-radius: 20rpx;
|
||
padding: 20rpx;
|
||
display: flex;
|
||
flex-direction: column;
|
||
}
|
||
.cam-diag-scroll { flex: 1; }
|
||
.cam-diag-text {
|
||
color: #9fd0ff;
|
||
font-size: 11px;
|
||
line-height: 1.7;
|
||
white-space: pre-wrap;
|
||
word-break: break-all;
|
||
}
|
||
.cam-diag-close {
|
||
margin-top: 16rpx;
|
||
text-align: center;
|
||
background: #F5F078;
|
||
color: #282828;
|
||
border-radius: 12rpx;
|
||
padding: 14rpx 0;
|
||
font-size: 13px;
|
||
}
|
||
|
||
/* ─── 调试模式结果 ─── */
|
||
.cam-debug {
|
||
position: absolute;
|
||
left: 0; top: 0; right: 0; bottom: 0;
|
||
background: #fff;
|
||
padding: 88rpx 40rpx 40rpx;
|
||
box-sizing: border-box;
|
||
overflow-y: auto;
|
||
z-index: 25;
|
||
}
|
||
.cam-debug-title { font-size: 17px; font-weight: 600; margin-bottom: 16rpx; }
|
||
.cam-debug-note { font-size: 12px; color: #707070; line-height: 1.6; margin-bottom: 24rpx; }
|
||
.cam-debug-item { margin-bottom: 32rpx; }
|
||
.cam-debug-img { width: 100%; height: 320rpx; background: #f2f2f2; }
|
||
.cam-debug-meta { font-size: 12px; color: #4A4A4A; margin-top: 12rpx; }
|
||
.cam-debug-btn { width: 100%; margin-top: 8rpx; }
|
||
.cam-debug-exit { margin-top: 24rpx; text-align: center; font-size: 13px; color: #707070; text-decoration: underline; }
|