diff --git a/cv/cp_cv/cp.go b/cv/cp_cv/cp.go index 9ea63c29dd041dacf21eb1ed29abb237515a25b5..82def3338ceca36de4ad89e962b70b5712736965 100644 --- a/cv/cp_cv/cp.go +++ b/cv/cp_cv/cp.go @@ -4,12 +4,7 @@ import "hilo-user/cv/user_cv" // cp信息 type CvCp struct { - CpInfo CvCpInfoAll `json:"cpInfo"` // cp信息 - CpLevel CvCpLevel `json:"cpLevel"` // cp等级 - MyPrivilegeList []CvPrivilege `json:"myPrivilegeList"` // 等级特权 -} - -type CvCpInfoAll struct { - UserInfo *user_cv.CvUserBase `json:"userInfo,omitempty"` // 用户信息 - CpUserInfo *user_cv.CvUserBase `json:"cpUserInfo,omitempty"` // cp用户信息 + CpUserInfo *user_cv.CvUserBase `json:"cpUserInfo"` // cp用户信息 + CpLevel CvCpLevel `json:"cpLevel"` // cp等级 + MyPrivilegeList []CvPrivilege `json:"myPrivilegeList"` // 等级特权 } diff --git a/route/user_r/inner.go b/route/user_r/inner.go index 95e88050a463d2b9ca183492a39948c7e1d2476e..4ed1ca726a8862df5b3bda153a88e06582ff6fc3 100644 --- a/route/user_r/inner.go +++ b/route/user_r/inner.go @@ -151,10 +151,7 @@ func GetUserCp(c *gin.Context) (*mycontext.MyContext, error) { } // 返回值 response = cp_cv.CvCp{ - CpInfo: cp_cv.CvCpInfoAll{ - //UserInfo: userBases[userId], - CpUserInfo: userBases[cpUserId], - }, + CpUserInfo: userBases[cpUserId], CpLevel: cp_cv.CvCpLevel{ Level: cpLevel, },