From 1544151e5c77b53db065a38e9112797261379d24 Mon Sep 17 00:00:00 2001 From: Blizzard Date: Fri, 31 Jul 2026 18:39:09 +0800 Subject: [PATCH] =?UTF-8?q?style(fe):=20=E8=BA=AB=E4=BB=BD=E5=8D=A1?= =?UTF-8?q?=E9=99=8D=E5=88=B0=20cardH=3D540=EF=BC=8C=E5=8F=8D=E9=9D=A2?= =?UTF-8?q?=E5=8E=BB=E6=8E=89=E5=A4=87=E6=B3=A8=E8=A1=8C=E5=B9=B6=E5=8E=8B?= =?UTF-8?q?=E7=B4=A7=E7=89=88=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Opus 5 --- pets-fe/pages/idcard/idcard.js | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/pets-fe/pages/idcard/idcard.js b/pets-fe/pages/idcard/idcard.js index b9f1a77..6f43e6b 100644 --- a/pets-fe/pages/idcard/idcard.js +++ b/pets-fe/pages/idcard/idcard.js @@ -98,7 +98,7 @@ Page({ // ══════════ 正面卡(暖黄)══════════ // 正反两张卡等高(都用 cardH),中间内容垂直居中,避免正面留空 - const cardH = 630; + const cardH = 540; const fH = cardH; const fY = pad; const gf = ctx.createLinearGradient(fx, fY, fx, fY + fH); @@ -229,10 +229,10 @@ Page({ ctx.textAlign = 'left'; ctx.fillStyle = '#8A90AE'; ctx.font = '600 27px sans-serif'; - this.spacedText(ctx, star + '星人地球移民', fx + 44, bY + 82, 8); + this.spacedText(ctx, star + '星人地球移民', fx + 44, bY + 70, 8); ctx.fillStyle = '#3E4A63'; - ctx.font = '800 66px sans-serif'; - ctx.fillText('居民身份卡', fx + 44, bY + 168); + ctx.font = '800 60px sans-serif'; + ctx.fillText('居民身份卡', fx + 44, bY + 150); // 资料行(标签 + 值) const rowX = fx + 44; @@ -245,15 +245,14 @@ Page({ ctx.fillStyle = '#3E4A63'; ctx.fillText(value || '—', rowX + 160, yy); }; - let ry = bY + 244; - kvB('主人', c.owner, ry); ry += 52; - kvB('联系电话', c.phone || '未验证', ry); ry += 52; - kvB('备注', c.notes || '无', ry); ry += 52; - kvB('签发机构', c.org || '肉垫计划', ry); ry += 52; + let ry = bY + 210; + kvB('主人', c.owner, ry); ry += 48; + kvB('联系电话', c.phone || '未验证', ry); ry += 48; + kvB('签发机构', c.org || '肉垫计划', ry); ry += 48; kvB('有效期限', c.validity || '永久有效', ry); // 小程序码(右下角,直接落在淡紫底上) - const qrD = 128, qrX = fx + cardW2 - 44 - qrD, qrY = bY + bH - 40 - qrD; + const qrD = 120, qrX = fx + cardW2 - 44 - qrD, qrY = bY + bH - 34 - qrD; ctx.fillStyle = '#fff'; this.roundRect(ctx, qrX, qrY, qrD, qrD, 14); ctx.fill();