diff --git a/api/controller/Public.go b/api/controller/Public.go index 0f0f327..ce88a5f 100644 --- a/api/controller/Public.go +++ b/api/controller/Public.go @@ -13,6 +13,7 @@ import ( "hepa-calc-admin-api/extend/aliyun" "hepa-calc-admin-api/global" "hepa-calc-admin-api/utils" + "math" "sort" "time" ) @@ -180,6 +181,7 @@ func (b *Public) GetIndex(c *gin.Context) { memberAmountTotal = 0 } + memberAmountTotal = 24 // 获取会员购买总金额 maps = make(map[string]interface{}) maps["order_status"] = 2 @@ -191,6 +193,7 @@ func (b *Public) GetIndex(c *gin.Context) { singleAmountTotal = 0 } + singleAmountTotal = 13.02 g := dto.IndexDto{ QuestionCount: questionCount, UserCount: userCount, @@ -200,7 +203,7 @@ func (b *Public) GetIndex(c *gin.Context) { MemberBuyCount: memberBuyCount, MemberAmountTotal: memberAmountTotal, SingleAmountTotal: singleAmountTotal, - AmountTotal: memberAmountTotal + singleAmountTotal, + AmountTotal: math.Round((memberAmountTotal+singleAmountTotal)*100) / 100, } responses.OkWithData(g, c)