diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/member/utils/QrCodeUtils.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/member/utils/QrCodeUtils.java index defa61e6f..7f5daf0c0 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/member/utils/QrCodeUtils.java +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/member/utils/QrCodeUtils.java @@ -22,6 +22,7 @@ import javax.swing.*; import java.awt.*; import java.awt.geom.Rectangle2D; import java.awt.image.BufferedImage; +import java.awt.image.ImageObserver; import java.awt.image.RenderedImage; import java.io.*; @@ -67,11 +68,11 @@ public class QrCodeUtils { Graphics2D g = bufImg.createGraphics(); g.drawImage(srcImg, 0, 0, srcImgWidth, srcImgHeight, null); //使用工具类生成二维码 - Image image = createQrCode(logoStream, url, 360, 360); -// Image image = createQrCode(logoStream, url, 260, 260); +// Image image = createQrCode(logoStream, url, 360, 360); + Image image = createQrCode(logoStream, url, 270, 270); //将小图片绘到大图片上,500,300 .表示你的小图片在大图片上的位置。 - g.drawImage(image, (bufImg.getWidth()-360)/2, 320, null); -// g.drawImage(image, (bufImg.getWidth()-260)/2, 153, null); +// g.drawImage(image, (bufImg.getWidth()-360)/2, 320, null); + g.drawImage(image, (bufImg.getWidth()-270)/2, 153, null); // 设置字体,样式,字体大小 // g.setFont(new Font("TimesRoman", Font.BOLD, 20)); g.setFont(chineseFont()); diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/storeInformation/service/impl/QRCodeServiceImpl.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/storeInformation/service/impl/QRCodeServiceImpl.java index 937f9cd9d..46f30da6e 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/storeInformation/service/impl/QRCodeServiceImpl.java +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/storeInformation/service/impl/QRCodeServiceImpl.java @@ -60,9 +60,9 @@ public class QRCodeServiceImpl extends ServiceImpl impleme //在图片上生成二维码 String backgroundImage = ""; if (type.equals("0")){ - backgroundImage = "static/qrCodeImg/laigeyouhui_bg.jpg"; + backgroundImage = "static/qrCodeImg/mendian_bg1.png"; }else { - backgroundImage = "static/qrCodeImg/laigeyouhui_bg1.png"; + backgroundImage = "static/qrCodeImg/mendian_bg2.png"; } String logoImage = "static/qrCodeImg/logo.png"; diff --git a/fuintBackend/fuint-application/src/main/resources/static/qrCodeImg/mendian_bg1.png b/fuintBackend/fuint-application/src/main/resources/static/qrCodeImg/mendian_bg1.png index 17fad7c65..3506ede5b 100644 Binary files a/fuintBackend/fuint-application/src/main/resources/static/qrCodeImg/mendian_bg1.png and b/fuintBackend/fuint-application/src/main/resources/static/qrCodeImg/mendian_bg1.png differ diff --git a/fuintBackend/fuint-application/src/main/resources/static/qrCodeImg/mendian_bg2.png b/fuintBackend/fuint-application/src/main/resources/static/qrCodeImg/mendian_bg2.png index d2dbdb5e3..867fed00b 100644 Binary files a/fuintBackend/fuint-application/src/main/resources/static/qrCodeImg/mendian_bg2.png and b/fuintBackend/fuint-application/src/main/resources/static/qrCodeImg/mendian_bg2.png differ