From 55147b1c885517f1eb816bc1eb888630202a7b6c Mon Sep 17 00:00:00 2001 From: huangguancheng Date: Fri, 10 Jan 2025 17:41:19 +0800 Subject: [PATCH] fixed --- app/service/AdsInsightService.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/service/AdsInsightService.php b/app/service/AdsInsightService.php index 8d26de5..e45fadb 100644 --- a/app/service/AdsInsightService.php +++ b/app/service/AdsInsightService.php @@ -525,7 +525,7 @@ class AdsInsightService // 计算 ROAS $roas = $total_spend == 0 ? '-' : round($total_purchases_value / $total_spend, 2); - $cost_per_purchase = $total_purchases == 0? '-' : round($total_spend / $total_purchases, 2); + $cost_per_purchase = $total_purchases == 0? 0 : round($total_spend / $total_purchases, 2); // 计算 CTR $ctr = $total_impressions > 0 ? number_format(($total_clicks / $total_impressions) * 100, 2) . '%' : '-';