This commit is contained in:
Mrx
2026-02-09 10:58:32 +08:00
parent e96adc9f98
commit ad809f6f8b
32 changed files with 1875 additions and 1781 deletions

View File

@@ -32,7 +32,7 @@ func (s *ImageService) ProcessImageWithQRCode(qrcodeType, qrcodeUrl string) ([]b
case "promote":
backgroundImageName = "tg_qrcode_1.png"
case "invitation":
backgroundImageName = "yq_qrcode_1.png"
backgroundImageName = "invitation_03.jpg" // 与 uniapp-ycc src/static/invitation 一致
default:
backgroundImageName = "tg_qrcode_1.png" // 默认使用第一张图片
}
@@ -78,11 +78,10 @@ func (s *ImageService) ProcessImageWithQRCode(qrcodeType, qrcodeUrl string) ([]b
qrY = imgHeight - qrSize - 190 // 距底边100px
case "invitation":
// invitation类型精确设置二维码尺寸
qrSize = 360 // 固定尺寸320px
// 中间偏上位置
// invitation类型底图 invitation_03.jpg 为 1889×3425白框在标题下方居中
qrSize = 800 // 二维码边长,适配白框尺寸
qrX = (imgWidth - qrSize) / 2 // 水平居中
qrY = 555 // 垂直位置200px
qrY = 860 // 垂直位置,对齐白框
default:
// 默认promote样式
@@ -162,7 +161,7 @@ func (s *ImageService) CheckImageExists(qrcodeType string) bool {
case "promote":
backgroundImageName = "tg_qrcode_1.png"
case "invitation":
backgroundImageName = "yq_qrcode_1.png"
backgroundImageName = "invitation_03.jpg"
default:
backgroundImageName = "tg_qrcode_1.png"
}