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) . '%' : '-';