分享修改

dev
mofangmin 1 year ago
parent 1d87ca592e
commit 082625cbd8
  1. 6
      modules/web/handler/share.go
  2. 4
      modules/web/values/share.go

@ -139,7 +139,7 @@ func ShareList(c *gin.Context) {
for _, item := range ret { for _, item := range ret {
resp.TodayRewardList = append(resp.TodayRewardList, values.RewardInfo{ resp.TodayRewardList = append(resp.TodayRewardList, values.RewardInfo{
UID: item.Uid, UID: item.Uid,
Amount: item.Amount, Amount: util.Decimal(float64(item.Amount)/common.DecimalDigits, 2),
}) })
} }
} else if req.Type == 2 { } else if req.Type == 2 {
@ -154,7 +154,7 @@ func ShareList(c *gin.Context) {
for _, item := range ret { for _, item := range ret {
resp.RewardList = append(resp.RewardList, values.RewardInfo{ resp.RewardList = append(resp.RewardList, values.RewardInfo{
UID: item.Uid, UID: item.Uid,
Amount: item.Amount, Amount: util.Decimal(float64(item.Amount)/common.DecimalDigits, 2),
}) })
} }
} else if req.Type == 3 { } else if req.Type == 3 {
@ -170,7 +170,7 @@ func ShareList(c *gin.Context) {
user, _ := call.GetUserXInfo(item.Uid, "birth") user, _ := call.GetUserXInfo(item.Uid, "birth")
resp.InviteList = append(resp.InviteList, values.InviteInfo{ resp.InviteList = append(resp.InviteList, values.InviteInfo{
UID: item.Uid, UID: item.Uid,
RechargeAmount: item.RechargeAmount, RechargeAmount: item.RechargeAmount / common.DecimalDigits,
RegisterTime: user.Birth, RegisterTime: user.Birth,
}) })
} }

@ -221,8 +221,8 @@ type ShareListResp struct {
Count int // 总数 Count int // 总数
} }
type RewardInfo struct { type RewardInfo struct {
UID int // UID UID int // UID
Amount int64 // 总额 Amount float64 // 总额
} }
type InviteInfo struct { type InviteInfo struct {

Loading…
Cancel
Save