瀏覽代碼

生成二维码相关

wangwl 3 月之前
父節點
當前提交
d8c218a8f6

+ 2 - 1
leromro-common/src/main/java/com/leromro/common/utils/WeChatMiniProgramUtil.java

@@ -122,7 +122,8 @@ public class WeChatMiniProgramUtil {
      */
     public String generateQrCodeWithText(String scene, String page, String footerText) throws Exception {
         byte[] qrCodeBytes = generateUnlimitedQrCode(scene, page);
-        return addTextToQrCode(qrCodeBytes, footerText, null, 18, Color.BLACK);
+        String fontName = "wqy-microhei";
+        return addTextToQrCode(qrCodeBytes, footerText, fontName, 18, Color.BLACK);
     }
 
 

+ 1 - 1
leromro-core/src/main/java/com/leromro/core/service/impl/InviteUserServiceImpl.java

@@ -288,7 +288,7 @@ public class InviteUserServiceImpl extends ServiceImpl<InviteUserMapper, InviteU
         }
         // 获取邀请二维码
         String qrCode = null;
-        String footerText = "金邻助家"+referrerName+")";
+        String footerText = "金邻助家("+referrerName+")";
         try {
             // 参数说明(referrerType+":"+referrerId+":2"),最后一个2标识当前二维码版本
             qrCode = weChatMiniProgramUtil.generateQrCodeWithText(referrerType+":"+referrerId+":2", page,footerText);