diff --git a/modules/web/handler/share.go b/modules/web/handler/share.go index cafe2e1..03a6034 100644 --- a/modules/web/handler/share.go +++ b/modules/web/handler/share.go @@ -139,7 +139,7 @@ func ShareList(c *gin.Context) { for _, item := range ret { resp.TodayRewardList = append(resp.TodayRewardList, values.RewardInfo{ UID: item.Uid, - Amount: item.Amount, + Amount: util.Decimal(float64(item.Amount)/common.DecimalDigits, 2), }) } } else if req.Type == 2 { @@ -154,7 +154,7 @@ func ShareList(c *gin.Context) { for _, item := range ret { resp.RewardList = append(resp.RewardList, values.RewardInfo{ UID: item.Uid, - Amount: item.Amount, + Amount: util.Decimal(float64(item.Amount)/common.DecimalDigits, 2), }) } } else if req.Type == 3 { @@ -170,7 +170,7 @@ func ShareList(c *gin.Context) { user, _ := call.GetUserXInfo(item.Uid, "birth") resp.InviteList = append(resp.InviteList, values.InviteInfo{ UID: item.Uid, - RechargeAmount: item.RechargeAmount, + RechargeAmount: item.RechargeAmount / common.DecimalDigits, RegisterTime: user.Birth, }) } diff --git a/modules/web/values/share.go b/modules/web/values/share.go index b9e723f..a3047f2 100644 --- a/modules/web/values/share.go +++ b/modules/web/values/share.go @@ -221,8 +221,8 @@ type ShareListResp struct { Count int // 总数 } type RewardInfo struct { - UID int // UID - Amount int64 // 总额 + UID int // UID + Amount float64 // 总额 } type InviteInfo struct {