This commit is contained in:
parent
a8b67d750b
commit
f35125cbce
|
|
@ -111,18 +111,12 @@ func (w *MiniUserApi) GetUserInfo(c *gin.Context) {
|
|||
|
||||
// 构造响应数据
|
||||
resp := wechatResponse.MiniUserInfoResponse{
|
||||
ID: user.ID,
|
||||
OpenID: user.OpenID,
|
||||
UnionID: user.UnionID,
|
||||
NickName: user.Nickname,
|
||||
Avatar: user.AvatarURL,
|
||||
Phone: user.Phone,
|
||||
Gender: user.Gender,
|
||||
City: user.City,
|
||||
Province: user.Province,
|
||||
Country: user.Country,
|
||||
CreateTime: user.CreatedAt.Format("2006-01-02 15:04:05"),
|
||||
UpdateTime: user.UpdatedAt.Format("2006-01-02 15:04:05"),
|
||||
NeedPhoneAuth: user.Phone == nil || *user.Phone == "", // 如果没有手机号则需要授权
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue