diff --git a/api/dto/User.go b/api/dto/User.go index b21f4ee..285d1c0 100644 --- a/api/dto/User.go +++ b/api/dto/User.go @@ -26,7 +26,7 @@ type UserDto struct { LoginIp string `json:"login_ip"` // 登陆ip CreatedAt model.LocalTime `json:"created_at"` // 创建时间 UpdatedAt model.LocalTime `json:"updated_at"` // 更新时间 - IsCompleteInfo bool `json:"Is_complete_info"` // 信息是否完整(0:否 1:是) + IsCompleteInfo bool `json:"is_complete_info"` // 信息是否完整(0:否 1:是) } // UserCheckDto 检测用户 diff --git a/api/service/User.go b/api/service/User.go index 99a0740..4332820 100644 --- a/api/service/User.go +++ b/api/service/User.go @@ -940,5 +940,18 @@ func (r *UserService) CheckUserInfo(userInfo *model.UserInfo) bool { if userInfo.Height == "" { return false } - return false + + if userInfo.Weight == "" { + return false + } + + if userInfo.IsFamilyHistory == nil { + return false + } + + if userInfo.ProvinceId == nil { + return false + } + + return true }