From 8c6922813e84ef6939dcb1a5cd5eefd1198dbe95 Mon Sep 17 00:00:00 2001 From: zihanjian Date: Sat, 7 Jun 2025 21:39:42 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4CompletionCard=E7=BB=84?= =?UTF-8?q?=E4=BB=B6=E7=9A=84=E7=94=BB=E5=B8=83=E5=B0=BA=E5=AF=B8=EF=BC=8C?= =?UTF-8?q?=E8=AE=BE=E7=BD=AE=E4=B8=BA=E5=9B=BA=E5=AE=9A=E9=AB=98=E5=BA=A6?= =?UTF-8?q?1280=EF=BC=8C=E4=BC=98=E5=8C=96=E6=89=8B=E6=9C=BA=E5=88=86?= =?UTF-8?q?=E4=BA=AB=E9=80=82=E9=85=8D=EF=BC=8C=E6=8F=90=E5=8D=87=E7=94=A8?= =?UTF-8?q?=E6=88=B7=E4=BA=A4=E4=BA=92=E4=BD=93=E9=AA=8C=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/CompletionCard.tsx | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/src/components/CompletionCard.tsx b/src/components/CompletionCard.tsx index 2117ac2..a1926a6 100644 --- a/src/components/CompletionCard.tsx +++ b/src/components/CompletionCard.tsx @@ -148,15 +148,9 @@ const CompletionCard: React.FC = ({ const thumbnailDataURL = generateThumbnail(); const isUsingPixelArt = userPhoto === thumbnailDataURL; - // 动态计算画布尺寸 + // 设置画布尺寸 (9:16比例,适合手机分享) const cardWidth = 720; - const topPadding = 120; // 顶部标题区域 - const imageSize = Math.min(cardWidth * 0.9, 600); // 主图片尺寸,最大600px - const bottomInfoHeight = 120; // 底部信息区域 - const bottomBrandHeight = 80; // 底部品牌区域 - const padding = 40; // 各区域间的间距 - - const cardHeight = topPadding + imageSize + bottomInfoHeight + bottomBrandHeight + padding * 2; + const cardHeight = 1280; canvas.width = cardWidth; canvas.height = cardHeight;