This commit is contained in:
toom1996
2025-07-30 14:19:58 +08:00
parent 942892898e
commit 731fa0a352

View File

@ -25,7 +25,7 @@ class WebsiteController extends AbstractController
foreach ($query as &$item) {
$total = AppNews::query()->where('platform', $item['id'])->where('is_delete', 0)->count();
$include = AppNews::query()->where('platform', $item['id'])->where('is_record', 1)->where('is_delete', 0)->count();
$item['record'] = '百度:' . ($include ? round($include/$total, 2) : 0) . '%';
$item['record'] = '百度:' . ($include ? round($include/$total * 100, 2) : 0) . '%';
}
return $this->response->json([
'code' => 0,