Commit d0121190 authored by hujiebin's avatar hujiebin

查看别人的cp空间

parent b86a5d09
...@@ -71,11 +71,20 @@ func CpSpace(c *gin.Context) (*mycontext.MyContext, error) { ...@@ -71,11 +71,20 @@ func CpSpace(c *gin.Context) (*mycontext.MyContext, error) {
if cpUserId == userId { if cpUserId == userId {
cpUserId = cpRelation.UserId1 cpUserId = cpRelation.UserId1
} }
applyToUnbind = cp_m.GetApplyToUnbind(model, userId, cpUserId)
cpUserInfo, err = user_m.GetUser(model, cpUserId) cpUserInfo, err = user_m.GetUser(model, cpUserId)
if err != nil { if err != nil {
return myContext, err return myContext, err
} }
// 查看别人的cp空间
if userId != cpRelation.UserId1 && userId != cpRelation.UserId2 {
userInfo, err = user_m.GetUser(model, cpRelation.UserId1)
if err != nil {
return myContext, err
}
} else {
// 自己的空间
applyToUnbind = cp_m.GetApplyToUnbind(model, userId, cpUserId)
}
} }
if cpLevel != cp_e.CpLevelMax { if cpLevel != cp_e.CpLevelMax {
nextPoints = cp_e.CpLevelPoints[cpLevel+1] nextPoints = cp_e.CpLevelPoints[cpLevel+1]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment