1.fix wechat login with emoji nickName

main
Gary 5 months ago
parent ae3f472423
commit 43bba3291f

@ -58,6 +58,10 @@ public class UserInfo implements Serializable {
*
*/
private String wxNickname;
public String getWxNickname() {
return EmojiConverterUtil.decode(wxNickname);
}
/**
* apple

@ -9,6 +9,8 @@ import com.luoo.user.dto.response.*;
import com.luoo.user.dto.request.WeChatBindReq;
import com.luoo.user.dto.request.WeChatLoginReq;
import com.luoo.user.pojo.UserInfo;
import com.luoo.user.util.EmojiConverterUtil;
import constants.Constants;
import dto.UserLoginDto;
import lombok.extern.slf4j.Slf4j;
@ -180,7 +182,7 @@ public class WeChatAouth2Service {
return Result.failed(StatusCode.WECHAT_lOGIN_FAILED);
}
String wechatUsername = getWechatUsername(accessToken, openId);
String wechatUsername = EmojiConverterUtil.encode(getWechatUsername(accessToken, openId));
// 如果当前手机号在数据库中存在,更新用户信息wxid,返回token

Loading…
Cancel
Save