diff --git a/app/hdl/hdl_user.go b/app/hdl/hdl_user.go index 6d9d031..f3c16ab 100644 --- a/app/hdl/hdl_user.go +++ b/app/hdl/hdl_user.go @@ -113,7 +113,7 @@ func InviteCodeUserInfo(c *gin.Context) { user = svc.UserImg(user) res := md.InviteCodeUserInfoResp{ Nickname: nickname, - HeadImg: user.Avatar, + HeadImg: svc.GetOssUrl(user.Avatar), } e.OutSuc(c, res, nil) return diff --git a/app/svc/svc_common.go b/app/svc/svc_common.go index 2cd5dd2..17bb9a5 100644 --- a/app/svc/svc_common.go +++ b/app/svc/svc_common.go @@ -22,6 +22,7 @@ func UserImg(user *model.User) *model.User { if user.Avatar == "" { user.Avatar = GetSysCfgStr("default_avatar") } + user.Avatar = GetOssUrl(user.Avatar) return user } func GetOssDomain() string {