From 33e8c7ca2e4b3e7579361600ef9c10e47cf1d296 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Sat, 18 May 2024 20:42:48 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E4=BB=A3=E7=A0=81=E8=AF=84=E5=AE=A1?= =?UTF-8?q?=E3=80=91MEMBER=EF=BC=9A=E5=AE=8C=E5=96=84=E5=BE=AE=E4=BF=A1?= =?UTF-8?q?=E5=B0=8F=E7=A8=8B=E5=BA=8F=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../member/controller/app/social/AppSocialUserController.java | 1 + .../member/controller/app/social/vo/AppSocialWxQrcodeReqVO.java | 1 + 2 files changed, 2 insertions(+) diff --git a/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/controller/app/social/AppSocialUserController.java b/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/controller/app/social/AppSocialUserController.java index 6e3973525..2cf7b8641 100644 --- a/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/controller/app/social/AppSocialUserController.java +++ b/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/controller/app/social/AppSocialUserController.java @@ -71,6 +71,7 @@ public class AppSocialUserController { public CommonResult getWxQrcode(@RequestBody @Valid AppSocialWxQrcodeReqVO reqVO) { byte[] wxQrcode = socialClientApi.getWxaQrcode(BeanUtils.toBean(reqVO, SocialWxQrcodeReqDTO.class) .setEnvVersion(AppSocialWxQrcodeReqVO.ENV_VERSION)); + // TODO @puhui999:1)是不是 base64 返回,不拼接哈 data:image/png;base64;2)cn.hutool.core.codec.Base64.encode() return success("data:image/png;base64," + Base64.getEncoder().encodeToString(wxQrcode)); } diff --git a/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/controller/app/social/vo/AppSocialWxQrcodeReqVO.java b/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/controller/app/social/vo/AppSocialWxQrcodeReqVO.java index 10321519c..aabdc72c9 100644 --- a/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/controller/app/social/vo/AppSocialWxQrcodeReqVO.java +++ b/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/controller/app/social/vo/AppSocialWxQrcodeReqVO.java @@ -10,6 +10,7 @@ import lombok.Data; public class AppSocialWxQrcodeReqVO { // TODO @puhui999: 没有默认值 getQrcodeService().createWxaCodeUnlimitBytes() 转类型会报错 🤣 + // TODO @puhui999:懂了哈;default 最好在 controller 搞;对于 VO 来说,不给默认值; public static String ENV_VERSION = "release"; // 小程序版本。正式版为 "release",体验版为 "trial",开发版为 "develop" private static String SCENE = ""; // 页面路径不能携带参数(参数请放在scene字段里) private static Integer WIDTH = 430; // 二维码宽度