【代码评审】MEMBER:完善微信小程序码

This commit is contained in:
YunaiV 2024-05-18 20:42:48 +08:00
parent 668b97e4ed
commit 33e8c7ca2e
2 changed files with 2 additions and 0 deletions

View File

@ -71,6 +71,7 @@ public class AppSocialUserController {
public CommonResult<String> getWxQrcode(@RequestBody @Valid AppSocialWxQrcodeReqVO reqVO) {
byte[] wxQrcode = socialClientApi.getWxaQrcode(BeanUtils.toBean(reqVO, SocialWxQrcodeReqDTO.class)
.setEnvVersion(AppSocialWxQrcodeReqVO.ENV_VERSION));
// TODO @puhui9991是不是 base64 返回不拼接哈 data:image/png;base642cn.hutool.core.codec.Base64.encode()
return success("data:image/png;base64," + Base64.getEncoder().encodeToString(wxQrcode));
}

View File

@ -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; // 二维码宽度