f add
This commit is contained in:
@@ -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"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user