From e6e75a603bb19ec88c62676334c7f39b0a64df08 Mon Sep 17 00:00:00 2001 From: hujiebin Date: Fri, 9 Jun 2023 15:31:31 +0800 Subject: [PATCH] feat: --- cv/cp_cv/cp.go | 11 +++-------- route/user_r/inner.go | 5 +---- 2 files changed, 4 insertions(+), 12 deletions(-) diff --git a/cv/cp_cv/cp.go b/cv/cp_cv/cp.go index 9ea63c2..82def33 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 95e8805..4ed1ca7 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, }, -- 2.22.0