feat(index): 添加昨日跑量数据展示
- 在 index.go 中增加昨日跑量相关数据的计算和存储 - 在 index.html 中添加昨日跑量数据的显示区域- 在 index.js 中更新数据加载逻辑,加载并显示昨日跑量数据
This commit is contained in:
@@ -66,6 +66,14 @@ func (c *Index) LoadUserAccountInfo() {
|
||||
totalSummary.TodaySucAmount = totalSummaryList[0].SuccessAmount
|
||||
totalSummary.TodaySucRate = totalSummaryList[0].Rate
|
||||
}
|
||||
if len(totalSummaryList) > 1 {
|
||||
totalSummary.YesterdayAmount = totalSummaryList[1].TotalAmount
|
||||
totalSummary.YesterdayNum = totalSummaryList[1].TotalNum
|
||||
totalSummary.YesterdaySucNum = totalSummaryList[1].SuccessNum
|
||||
totalSummary.YesterdaySucAmount = totalSummaryList[1].SuccessAmount
|
||||
totalSummary.YesterdaySucRate = totalSummaryList[1].Rate
|
||||
}
|
||||
|
||||
for _, v := range totalSummaryList {
|
||||
totalSummary.TotalAmount += v.TotalAmount
|
||||
totalSummary.TotalNum += v.TotalNum
|
||||
@@ -81,6 +89,7 @@ func (c *Index) LoadUserAccountInfo() {
|
||||
info["settAmount"] = pubMethod.FormatFloat64ToString(totalSummary.TodaySucAmount)
|
||||
// 冻结金额
|
||||
info["freezeAmt"] = pubMethod.FormatFloat64ToString(totalSummary.TotalSucAmount)
|
||||
info["yesterdayAmount"] = pubMethod.FormatFloat64ToString(totalSummary.YesterdayAmount)
|
||||
// 押款金额
|
||||
info["amountFrozen"] = pubMethod.FormatFloat64ToString(totalSummary.TotalSucRate)
|
||||
|
||||
|
||||
@@ -8,6 +8,7 @@ let index = {
|
||||
$("#settAmount").text(result["settAmount"]);
|
||||
$("#freezeAmt").text(result["freezeAmt"]);
|
||||
$("#amountFrozen").text(result["amountFrozen"])
|
||||
$("#yesterdayAmount").text(result["yesterdayAmount"])
|
||||
},
|
||||
error: function (XMLHttpRequest) {
|
||||
toastr.info('something is wrong, code: ' + XMLHttpRequest.status)
|
||||
|
||||
@@ -102,6 +102,19 @@
|
||||
<div class="number"><strong id="settAmount">0.00</strong></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xl-3 col-sm-4">
|
||||
<div class="item d-flex align-items-center">
|
||||
<div class="icon bg-green"><i class="icon icon-presentation"></i></div>
|
||||
<div class="title"><span>今日跑量<br><small> </small></span>
|
||||
<div class="progress">
|
||||
<div role="progressbar" style="width: 80%; height: 4px;" aria-valuenow="55"
|
||||
aria-valuemin="0" aria-valuemax="100" class="progress-bar bg-green">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="number"><strong id="yesterdayAmount">0.00</strong></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xl-3 col-sm-4">
|
||||
<div class="item d-flex align-items-center">
|
||||
<div class="icon bg-green"><i class="icon icon-presentation"></i></div>
|
||||
|
||||
Reference in New Issue
Block a user