Browse Source

Merge branch 'web_sannong_fr'

15313670163 3 months ago
parent
commit
94730cf525
1 changed files with 4 additions and 0 deletions
  1. 4 0
      app/JsonRpc/NewsService.php

+ 4 - 0
app/JsonRpc/NewsService.php

@@ -411,6 +411,7 @@ class NewsService implements NewsServiceInterface
             }
         }
         // return Result::success($where);
+
         $rep = Article::where(function ($query) use ($where) {
             foreach ($where as $condition) {
                 if ($condition[1] === 'in') {
@@ -424,6 +425,7 @@ class NewsService implements NewsServiceInterface
         ->limit($data['pageSize'])
         ->offset(($data['page'] - 1) * $data['pageSize'])
         ->get();
+
         $count =  Article::where(function ($query) use ($where) {
             foreach ($where as $condition) {
                 if ($condition[1] === 'in') {
@@ -433,10 +435,12 @@ class NewsService implements NewsServiceInterface
                 }
             }
         })->count();
+
         $data = [
             'rows'=>$rep->toArray(),
             'count'=>$count
         ];
+        
         if(empty($rep)){
             return Result::error("没有信息数据");
         }