fix: 钉钉桌面端通知二维码被裁剪

桌面端钉钉会把 Markdown 图片裁成横向区域,正方形二维码上下被裁掉。
二维码居中放到 3:2 白底画布上;网页中的二维码图片改用 object-fit 避免拉伸。

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
shenlei
2026-10-23 10:44:35 +09:00
co-authored by Claude Opus 5.5
parent 8f2f23682f
commit 6890f13aa9
4 changed files with 25 additions and 4 deletions
+5
View File
@@ -87,6 +87,11 @@ def test_adhoc_distribution_uploads_qrcode(tmp_path):
".ipa", ".plist", ".html", ".png",
]
# 桌面端钉钉会把图片裁成横向比例,二维码需放在 3:2 的横向画布上
from PIL import Image
with Image.open(tmp_path / "build" / "distribution" / "100_2_0_0_dev_adhoc.png") as image:
assert image.width == round(image.height * 1.5)
def test_delete_adhoc_artifacts_deletes_all_remote_files():
config = {"APPID": "100", "VERSION": "2.0.0.0", "SOURCE_BRANCH": "main", "BUILD_TYPE": "Ad_Hoc", "OSS_FLODER": "readoor"}