From 83ac168a8c60e20f2930157e2476338d17d03d39 Mon Sep 17 00:00:00 2001 From: toom1996 Date: Mon, 4 Aug 2025 17:00:06 +0800 Subject: [PATCH] update --- app/Rpc/baoxian/NewsService.php | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/app/Rpc/baoxian/NewsService.php b/app/Rpc/baoxian/NewsService.php index fd26c91..c9887cc 100644 --- a/app/Rpc/baoxian/NewsService.php +++ b/app/Rpc/baoxian/NewsService.php @@ -136,8 +136,17 @@ class NewsService extends BaseService } } - $articles['articles'] = $res; + $articles['articles'] = $res;// 随机推荐 + $articles['about'] = AppNews::formatQuery(['created_at']) + ->where('platform', $id) + ->where('is_delete', 0) + ->select(['title', 'id']) + ->limit(10) + ->orderBy(Db::raw('RAND()')) + ->get() + ->toArray(); $total = current($total)?->total ?? 0; + var_dump('pageCOunt',$total / $limit); return $this->getResponse()->setExtra('total', ceil($total / $limit))->setData($articles)->setCode(0)->send(); } } \ No newline at end of file