diff --git a/route/cp_r/rank.go b/route/cp_r/rank.go index a0cd46f272568e749b24299d7118d5bf4778a891..75e3fdb28062df111c798627d48201278e95d5ae 100644 --- a/route/cp_r/rank.go +++ b/route/cp_r/rank.go @@ -221,7 +221,14 @@ func CpMy(c *gin.Context) (*mycontext.MyContext, error) { } if relation.UserId2 > 0 { response.User2 = userBases[relation.UserId2] - response.Ranking = "99+" + response.Ranking = "30+" + ranks := cp_m.PageCpDayRank(model, beginDate, endDate, 0, 30) + for i, rank := range ranks { + if relation.ID == rank.CpId { + response.Ranking = fmt.Sprintf("%d", i+1) + break + } + } } resp.ResponseOk(c, response) return myCtx, nil