Ver Fonte

修改排序时间

rkljw há 1 mês atrás
pai
commit
c785f26801
1 ficheiros alterados com 1 adições e 1 exclusões
  1. 1 1
      app/JsonRpc/NewsService.php

+ 1 - 1
app/JsonRpc/NewsService.php

@@ -220,7 +220,7 @@ class NewsService implements NewsServiceInterface
             })
             ->leftJoin('category', 'article.catid', 'category.id')
             ->select("article.*", "category.name as category_name")
-            ->orderBy("article.id", "desc")
+            ->orderBy("article.updated_at", "desc")
             ->limit($data['pageSize'])
             ->offset(($data['page'] - 1) * $data['pageSize'])->get();
         $count = Article::where($where)->whereNotIn('article.status', [404])