【代码评审】MEMBER:完善微信小程序码
This commit is contained in:
parent
668b97e4ed
commit
33e8c7ca2e
|
@ -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 @puhui999:1)是不是 base64 返回,不拼接哈 data:image/png;base64;2)cn.hutool.core.codec.Base64.encode()
|
||||
return success("data:image/png;base64," + Base64.getEncoder().encodeToString(wxQrcode));
|
||||
}
|
||||
|
||||
|
|
|
@ -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; // 二维码宽度
|
||||
|
|
Loading…
Reference in New Issue