fix:后台首页数据百分比计算bug修复
This commit is contained in:
parent
0b15640215
commit
86053de7e8
@ -106,7 +106,9 @@ class Home
|
||||
};
|
||||
|
||||
//上升百分比计算
|
||||
$percentage = round((($today_total_count - $yesterday_total_count) / $yesterday_total_count) * 100, 2);
|
||||
$dividend = ($today_total_count - $yesterday_total_count);
|
||||
$divisor = $yesterday_total_count == 0 ? 1 : $yesterday_total_count;
|
||||
$percentage = round(($dividend / $divisor) * 100, 2);
|
||||
|
||||
return [
|
||||
'count' => $today_total_count,
|
||||
|
Loading…
Reference in New Issue
Block a user