afa 5 月之前
父节点
当前提交
cf469afbc1
共有 1 个文件被更改,包括 3 次插入3 次删除
  1. 3 3
      app/common/model/MoneyLog.php

+ 3 - 3
app/common/model/MoneyLog.php

@@ -78,9 +78,9 @@ class MoneyLog Extends Model
         $expenditure = $expenditure->sum('change');
         $expenditure = $expenditure->sum('change');
         $balance = $income - $expenditure;
         $balance = $income - $expenditure;
         return [
         return [
-            'balance' => $balance,
-            'income' => $income,
-            'expenditure' => $expenditure
+            'balance' => round($balance,2),
+            'income' => round($income,2),
+            'expenditure' => round($expenditure,2)
         ];
         ];
     }
     }