From 4ca5b458f0a61605fb6ffbf771774f8678c9592f Mon Sep 17 00:00:00 2001 From: karl Date: Tue, 6 Aug 2024 18:30:23 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BA=A7=E5=93=81=E9=A1=B5=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- service/app/admin/controller/IndexController.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/service/app/admin/controller/IndexController.php b/service/app/admin/controller/IndexController.php index 49e832e0..a7a45f31 100644 --- a/service/app/admin/controller/IndexController.php +++ b/service/app/admin/controller/IndexController.php @@ -329,8 +329,8 @@ class IndexController extends base foreach ($list['data'] as &$item) { // $item['refund_rate'] = bcmul(bcdiv((string)$item['refund'], (string)$item['all'], 4), '100', 2); // $item['asset_rate'] = bcmul(bcdiv((string)$item['asset'], (string)$item['all'], 4), '100', 2); - $item['refund_rate'] = ''; - $item['asset_rate'] = ''; + $item['refund_rate'] = number_format(($item['refund']/$item['all'])*100,2); + $item['asset_rate'] = number_format(($item['asset']/$item['all'])*100,2);; } return $this->success($list);