fix: use slide captcha for iphone

This commit is contained in:
RockYang
2024-03-28 15:00:53 +08:00
parent c8ab209426
commit e6a18445c3
12 changed files with 456 additions and 34 deletions

View File

@@ -67,5 +67,11 @@ func (h *PowerLogHandler) List(c *gin.Context) {
list = append(list, log)
}
}
resp.SUCCESS(c, vo.NewPage(total, data.Page, data.PageSize, list))
// 统计消费算力总和
var totalPower float64
if len(data.Date) == 2 {
session.Where("mark", 0).Select("SUM(amount) as total_sum").Scan(&totalPower)
}
resp.SUCCESS(c, gin.H{"data": vo.NewPage(total, data.Page, data.PageSize, list), "stat": totalPower})
}